Namespace for mesh buffer modification. This is only to modify vertex coordinates and delta connections.
More...
Functions |
SP_EXPORT void | meshTranslate (video::MeshBuffer &Surface, const dim::vector3df &Direction) |
| Translates each vertex coordinate in the specified direction.
|
SP_EXPORT void | meshTransform (video::MeshBuffer &Surface, const dim::vector3df &Size) |
| Transforms each vertex coordinate by multiplying it with the specified size.
|
SP_EXPORT void | meshTransform (video::MeshBuffer &Surface, const dim::matrix4f &Matrix) |
| Transforms each vertex coordinate by multiplying it with the specified transformation matrix.
|
SP_EXPORT void | meshTurn (video::MeshBuffer &Surface, const dim::vector3df &Rotation) |
| Turns each vertex coordinate by rotating them with the specified rotation vector. This function performs a YXZ matrix rotation.
|
SP_EXPORT void | meshFlip (video::MeshBuffer &Surface) |
| Flips the mesh. i.e. each vertex coordinate will be inverted.
|
SP_EXPORT void | meshFlip (video::MeshBuffer &Surface, bool isXAxis, bool isYAxis, bool isZAxis) |
| Flips each vertex coordiante only for the specified axles.
|
SP_EXPORT void | meshClip (video::MeshBuffer &Surface, const dim::plane3df &Plane) |
SP_EXPORT void | meshFit (Mesh &Obj, const dim::vector3df &Position, const dim::vector3df &Size) |
SP_EXPORT void | meshSpherify (Mesh &Obj, f32 Factor) |
SP_EXPORT void | meshTwist (Mesh &Obj, f32 Rotation) |
Detailed Description
Namespace for mesh buffer modification. This is only to modify vertex coordinates and delta connections.
Function Documentation
SP_EXPORT void sp::scene::MeshModifier::meshClip |
( |
video::MeshBuffer & |
Surface, |
|
|
const dim::plane3df & |
Plane | |
|
) |
| | |
Clips the given surface by the given plane. The cliped vertices will be removed.
- Todo:
- Not yet implemented!
SP_EXPORT void sp::scene::MeshModifier::meshFit |
( |
Mesh & |
Obj, |
|
|
const dim::vector3df & |
Position, |
|
|
const dim::vector3df & |
Size | |
|
) |
| | |
Fits the mesh. i.e. each vertex's coordinate will be transformed to the specified box.
- Parameters:
-
[in,out] | Obj | Specifies the Mesh object. |
[in] | Position | Specifies the left-bottom-front position of the transformation box. |
[in] | Size | Specifies the size of the transformation box. |
SP_EXPORT void sp::scene::MeshModifier::meshFlip |
( |
video::MeshBuffer & |
Surface |
) |
|
Flips the mesh. i.e. each vertex coordinate will be inverted.
SP_EXPORT void sp::scene::MeshModifier::meshFlip |
( |
video::MeshBuffer & |
Surface, |
|
|
bool |
isXAxis, |
|
|
bool |
isYAxis, |
|
|
bool |
isZAxis | |
|
) |
| | |
Flips each vertex coordiante only for the specified axles.
SP_EXPORT void sp::scene::MeshModifier::meshSpherify |
( |
Mesh & |
Obj, |
|
|
f32 |
Factor | |
|
) |
| | |
Spherifies the whole mesh. Best primitive to get a nice sphere is the cube (but use more than 1 segment, e.g. 10 or more).
- Parameters:
-
[in,out] | Obj | Specifies the Mesh object. |
[in] | Factor | Transformation factor in the range from [-1.0 .. 1.0]. |
SP_EXPORT void sp::scene::MeshModifier::meshTransform |
( |
video::MeshBuffer & |
Surface, |
|
|
const dim::vector3df & |
Size | |
|
) |
| | |
Transforms each vertex coordinate by multiplying it with the specified size.
SP_EXPORT void sp::scene::MeshModifier::meshTransform |
( |
video::MeshBuffer & |
Surface, |
|
|
const dim::matrix4f & |
Matrix | |
|
) |
| | |
Transforms each vertex coordinate by multiplying it with the specified transformation matrix.
SP_EXPORT void sp::scene::MeshModifier::meshTranslate |
( |
video::MeshBuffer & |
Surface, |
|
|
const dim::vector3df & |
Direction | |
|
) |
| | |
Translates each vertex coordinate in the specified direction.
SP_EXPORT void sp::scene::MeshModifier::meshTurn |
( |
video::MeshBuffer & |
Surface, |
|
|
const dim::vector3df & |
Rotation | |
|
) |
| | |
Turns each vertex coordinate by rotating them with the specified rotation vector. This function performs a YXZ matrix rotation.
SP_EXPORT void sp::scene::MeshModifier::meshTwist |
( |
Mesh & |
Obj, |
|
|
f32 |
Rotation | |
|
) |
| | |
Twists the whole mesh. Can be used to create an other kind of a spiral when using a cube (with more than 1 segment, e.g. 10 or more).
- Parameters:
-
[in,out] | Obj | Specifies the Mesh object. |
[in] | Rotation | Rotation degree for the twist transformation. |