![]() |
Public API Reference |
This is a property class holding the representation of a mesh. More...
#include <propclass/mesh.h>
Public Member Functions | |
| virtual bool | AttachSocketMesh (const char *socket, iMeshWrapper *meshwrapper)=0 |
| Attach mesh to a socket. | |
| virtual void | CreateEmptyGenmesh (const char *factname)=0 |
| Create an empty genmesh (use instead of SetMesh()). | |
| virtual void | CreateEmptyThing (const char *factname)=0 |
| Create an empty thing mesh (use instead of SetMesh()). | |
| virtual void | CreateNullMesh (const char *factname, const csBox3 &box)=0 |
| Create a nullmesh (use instead of SetMesh()). | |
| virtual bool | DetachSocketMesh (const char *socket)=0 |
| Detach mesh from a socket. | |
| virtual const char * | GetAction ()=0 |
| Return the current action name. | |
| virtual iMeshWrapper * | GetMesh () const =0 |
| Get the mesh. | |
| virtual void | Hide ()=0 |
| Hide this mesh. | |
| virtual bool | IsVisible () const =0 |
| Return true if mesh is visible. | |
| virtual void | MoveMesh (iSector *sector, const csVector3 &pos)=0 |
| Convenience function to move the mesh to some sector and position and also update lighting. | |
| virtual void | MoveMesh (iSector *sector, const char *node)=0 |
| Convenience function to move the mesh to some sector and node and also update lighting. | |
| virtual void | MoveMesh (iPcMesh *other_mesh, const csVector3 &offset)=0 |
| Convenience function to move the mesh to a position relative to some other mesh, and also update lighting. | |
| virtual void | SetAction (const char *actionName, bool reset=false)=0 |
| Convenience function to set an 'action' for the mesh. | |
| virtual void | SetAnimation (const char *actionName, bool cycle, float weight=1.0, float fadein=0.1, float fadeout=0.1, bool reset=false)=0 |
| Function to set an 'action' for the mesh. | |
| virtual bool | SetMesh (const char *factname, const char *filename)=0 |
| Set the mesh filename to use. | |
| virtual void | SetMesh (iMeshWrapper *mesh, bool do_remove=false)=0 |
| Set the mesh to use directly. | |
| virtual void | SetPath (const char *path)=0 |
| Set the path to use. | |
| virtual void | SetReverseAction (bool reverse=true)=0 |
| Convenience function to set an 'action' to be reversed for the mesh. | |
| virtual void | Show ()=0 |
| Show this mesh. | |
This is a property class holding the representation of a mesh.
This property class supports the following actions (add prefix 'cel.mesh.action.' if you want to access this action through a message):
This property class supports the following properties:
| virtual bool iPcMesh::AttachSocketMesh | ( | const char * | socket, |
| iMeshWrapper * | meshwrapper | ||
| ) | [pure virtual] |
Attach mesh to a socket.
Only one mesh per socket. Support for genmesh, cal3d and sprite3d.
| socket | Name of the socket. |
| factory | Name of the loaded mesh factory. |
| virtual void iPcMesh::CreateEmptyGenmesh | ( | const char * | factname | ) | [pure virtual] |
Create an empty genmesh (use instead of SetMesh()).
Note that if the factory name already exists then the mesh will be created from that factory and this call becomes equivalent to SetMesh(factname,0).
| virtual void iPcMesh::CreateEmptyThing | ( | const char * | factname | ) | [pure virtual] |
| virtual void iPcMesh::CreateNullMesh | ( | const char * | factname, |
| const csBox3 & | box | ||
| ) | [pure virtual] |
Create a nullmesh (use instead of SetMesh()).
Note that if the factory name already exists then the mesh will be created from that factory and this call becomes equivalent to SetMesh(factname,0). A nullmesh can be used in mesh hierarchies.
| virtual bool iPcMesh::DetachSocketMesh | ( | const char * | socket | ) | [pure virtual] |
Detach mesh from a socket.
| socket | Name of the socket. |
| virtual const char* iPcMesh::GetAction | ( | ) | [pure virtual] |
Return the current action name.
| virtual iMeshWrapper* iPcMesh::GetMesh | ( | ) | const [pure virtual] |
Get the mesh.
| virtual void iPcMesh::Hide | ( | ) | [pure virtual] |
Hide this mesh.
| virtual bool iPcMesh::IsVisible | ( | ) | const [pure virtual] |
Return true if mesh is visible.
| virtual void iPcMesh::MoveMesh | ( | iSector * | sector, |
| const csVector3 & | pos | ||
| ) | [pure virtual] |
Convenience function to move the mesh to some sector and position and also update lighting.
If sector specified is 0, sector is not updated.
| virtual void iPcMesh::MoveMesh | ( | iSector * | sector, |
| const char * | node | ||
| ) | [pure virtual] |
Convenience function to move the mesh to some sector and node and also update lighting.
If sector specified is 0, sector is not updated.
| virtual void iPcMesh::MoveMesh | ( | iPcMesh * | other_mesh, |
| const csVector3 & | offset | ||
| ) | [pure virtual] |
Convenience function to move the mesh to a position relative to some other mesh, and also update lighting.
| other_mesh | pcmesh that will be used for base position. |
| offset | offset from the base mesh in that mesh local coordinates. |
| virtual void iPcMesh::SetAction | ( | const char * | actionName, |
| bool | reset = false |
||
| ) | [pure virtual] |
Convenience function to set an 'action' for the mesh.
This only works for 3D sprites. For other mesh objects nothing will happen.
| virtual void iPcMesh::SetAnimation | ( | const char * | actionName, |
| bool | cycle, | ||
| float | weight = 1.0, |
||
| float | fadein = 0.1, |
||
| float | fadeout = 0.1, |
||
| bool | reset = false |
||
| ) | [pure virtual] |
Function to set an 'action' for the mesh.
Works for cal3d, spr3d and genmeshskelanim, but note not all mesh objects support the same feature set.
| virtual bool iPcMesh::SetMesh | ( | const char * | factname, |
| const char * | filename | ||
| ) | [pure virtual] |
Set the mesh filename to use.
Returns false on failure. Note that this filename can refer to a mesh factory file or a library file containing a mesh factory. If 'filename' is not given (i.e. 0) then it is assumed the factory is already loaded in memory.
| virtual void iPcMesh::SetMesh | ( | iMeshWrapper * | mesh, |
| bool | do_remove = false |
||
| ) | [pure virtual] |
Set the mesh to use directly.
It is normally not recommended to use this function directly. iPcRegion will use it for its dummy entities.
| mesh | a pointer to an iMeshWrapper that will be attached to the pcmesh. |
| do_remove | if true then this pcmesh will remove the mesh on destruction. By default this will not happen if you use SetMesh() on an already existing mesh. |
| virtual void iPcMesh::SetPath | ( | const char * | path | ) | [pure virtual] |
Set the path to use.
If this is not done then the filename in SetMesh() will be used alone. Otherwise this path is used to temporarily set the current VFS dir while loading (which will be restored afterwards) and the filename in SetMesh() is used relative to that. Note that this must be called before SetMesh().
| virtual void iPcMesh::SetReverseAction | ( | bool | reverse = true | ) | [pure virtual] |
Convenience function to set an 'action' to be reversed for the mesh.
This only works for 3D sprites. For other mesh objects nothing will happen.
| virtual void iPcMesh::Show | ( | ) | [pure virtual] |
Show this mesh.