iDynamicsSystemCollider Struct Reference
This is the interface for a dynamics system collider. More...
#include <ivaria/dynamics.h>
Public Member Functions | |
virtual bool | CreateBoxGeometry (const csVector3 &box_size)=0 |
Create collider geometry with given box (given by its size). | |
virtual bool | CreateCapsuleGeometry (float length, float radius)=0 |
Create capsule collider geometry. | |
virtual bool | CreateConvexMeshGeometry (iMeshWrapper *mesh)=0 |
Create collider geometry with given convex mesh. | |
virtual bool | CreateCylinderGeometry (float length, float radius)=0 |
Create cylinder Geometry. | |
virtual bool | CreateMeshGeometry (iMeshWrapper *mesh)=0 |
Create collider geometry with given concave mesh. | |
virtual bool | CreatePlaneGeometry (const csPlane3 &plane)=0 |
Create collider geometry with given plane. | |
virtual bool | CreateSphereGeometry (const csSphere &sphere)=0 |
Create collider geometry with given sphere. | |
virtual void | FillWithColliderGeometry (csRef< iGeneralFactoryState > genmesh_fact)=0 |
Fill given General Mesh factory with collider geometry. | |
virtual bool | GetBoxGeometry (csVector3 &size)=0 |
If this collider has a box geometry then the method will return true and the size of the box, otherwise it will return false. | |
virtual bool | GetCapsuleGeometry (float &length, float &radius)=0 |
If this collider has a capsule geometry then the method will return true and the capsule's length and radius, otherwise it will return false. | |
virtual bool | GetConvexMeshGeometry (csVector3 *&vertices, size_t &vertexCount, int *&indices, size_t &triangleCount)=0 |
If this collider has a convex mesh geometry then the method will return true and the vertices and triangles of the mesh, otherwise it will return false. | |
virtual bool | GetCylinderGeometry (float &length, float &radius)=0 |
If this collider has a cylinder geometry then the method will return true and the cylinder's length and radius, otherwise it will return false. | |
virtual float | GetDensity ()=0 |
Get the density of the body. | |
virtual float | GetElasticity ()=0 |
Get the elasticity of the collider surface. | |
virtual float | GetFriction ()=0 |
Get the friction of the collider surface. | |
virtual csColliderGeometryType | GetGeometryType ()=0 |
Get the type of the geometry. | |
virtual csOrthoTransform | GetLocalTransform ()=0 |
Get collider transform. | |
virtual bool | GetMeshGeometry (csVector3 *&vertices, size_t &vertexCount, int *&indices, size_t &triangleCount)=0 |
If this collider has a concave mesh geometry then the method will return true and the vertices and triangles of the mesh, otherwise it will return false. | |
virtual bool | GetPlaneGeometry (csPlane3 &plane)=0 |
If this collider has a plane geometry then the method will return true and the plane, otherwise it will return false. | |
virtual float | GetSoftness ()=0 |
Get the softness of the collider surface. | |
virtual bool | GetSphereGeometry (csSphere &sphere)=0 |
If this collider has a sphere geometry then the method will return true and the sphere, otherwise it will return false. | |
virtual csOrthoTransform | GetTransform ()=0 |
Get collider transform (it will always be in world coordinates). | |
virtual bool | IsStatic ()=0 |
Check if collider is static. | |
virtual void | MakeDynamic ()=0 |
Make collider dynamic. | |
virtual void | MakeStatic ()=0 |
Make collider static. | |
virtual void | SetDensity (float density)=0 |
Set the density of this collider. | |
virtual void | SetElasticity (float elasticity)=0 |
Set the elasticity of the collider surface. | |
virtual void | SetFriction (float friction)=0 |
Set the friction of the collider surface. | |
virtual void | SetSoftness (float softness)=0 |
Set the softness of the collider surface. | |
virtual void | SetTransform (const csOrthoTransform &trans)=0 |
Set Collider transform. |
Detailed Description
This is the interface for a dynamics system collider.
It keeps all properties that system uses for collision detection and after collision behaviour (like surface properties, collider geometry). It can be placed into dynamic system (then this will be "static" collider by default) or attached to body (then it will be "dynamic").
Main creators of instances implementing this interface:
Main ways to get pointers to this interface:
Main users of this interface:
Definition at line 893 of file dynamics.h.
Member Function Documentation
virtual bool iDynamicsSystemCollider::CreateBoxGeometry | ( | const csVector3 & | box_size | ) | [pure virtual] |
Create collider geometry with given box (given by its size).
virtual bool iDynamicsSystemCollider::CreateCapsuleGeometry | ( | float | length, | |
float | radius | |||
) | [pure virtual] |
Create capsule collider geometry.
virtual bool iDynamicsSystemCollider::CreateConvexMeshGeometry | ( | iMeshWrapper * | mesh | ) | [pure virtual] |
Create collider geometry with given convex mesh.
virtual bool iDynamicsSystemCollider::CreateCylinderGeometry | ( | float | length, | |
float | radius | |||
) | [pure virtual] |
Create cylinder Geometry.
virtual bool iDynamicsSystemCollider::CreateMeshGeometry | ( | iMeshWrapper * | mesh | ) | [pure virtual] |
Create collider geometry with given concave mesh.
Concave colliders should be avoided because it is most costly to compute the collisions with them, and the simulation of their movement is less stable. It is safer to use a combination of convex colliders.
virtual bool iDynamicsSystemCollider::CreatePlaneGeometry | ( | const csPlane3 & | plane | ) | [pure virtual] |
Create collider geometry with given plane.
virtual bool iDynamicsSystemCollider::CreateSphereGeometry | ( | const csSphere & | sphere | ) | [pure virtual] |
Create collider geometry with given sphere.
virtual void iDynamicsSystemCollider::FillWithColliderGeometry | ( | csRef< iGeneralFactoryState > | genmesh_fact | ) | [pure virtual] |
Fill given General Mesh factory with collider geometry.
virtual bool iDynamicsSystemCollider::GetBoxGeometry | ( | csVector3 & | size | ) | [pure virtual] |
If this collider has a box geometry then the method will return true and the size of the box, otherwise it will return false.
virtual bool iDynamicsSystemCollider::GetCapsuleGeometry | ( | float & | length, | |
float & | radius | |||
) | [pure virtual] |
If this collider has a capsule geometry then the method will return true and the capsule's length and radius, otherwise it will return false.
virtual bool iDynamicsSystemCollider::GetConvexMeshGeometry | ( | csVector3 *& | vertices, | |
size_t & | vertexCount, | |||
int *& | indices, | |||
size_t & | triangleCount | |||
) | [pure virtual] |
If this collider has a convex mesh geometry then the method will return true and the vertices and triangles of the mesh, otherwise it will return false.
- Parameters:
-
vertices Array of the vertices of the geometry. The array will be deleted and reallocated by this call, you should therefore call 'delete[]' on your array after having used it. vertexCount The number of vertices that have been put in the array. indices Array of the indices of the triangles of the geometry. There are 3 indices per triangle. The indices are put consecutively, so the array is one-dimensional. The array will be deleted and reallocated by this call, you should therefore call 'delete[]' on your array after having used it. triangleCount The number of triangles that have been put in the array of indices.
virtual bool iDynamicsSystemCollider::GetCylinderGeometry | ( | float & | length, | |
float & | radius | |||
) | [pure virtual] |
If this collider has a cylinder geometry then the method will return true and the cylinder's length and radius, otherwise it will return false.
virtual float iDynamicsSystemCollider::GetDensity | ( | ) | [pure virtual] |
Get the density of the body.
virtual float iDynamicsSystemCollider::GetElasticity | ( | ) | [pure virtual] |
Get the elasticity of the collider surface.
virtual float iDynamicsSystemCollider::GetFriction | ( | ) | [pure virtual] |
Get the friction of the collider surface.
virtual csColliderGeometryType iDynamicsSystemCollider::GetGeometryType | ( | ) | [pure virtual] |
Get the type of the geometry.
virtual csOrthoTransform iDynamicsSystemCollider::GetLocalTransform | ( | ) | [pure virtual] |
Get collider transform.
If the collider is attached to a body, then the transform will be in body space, otherwise it will be in world coordinates.
virtual bool iDynamicsSystemCollider::GetMeshGeometry | ( | csVector3 *& | vertices, | |
size_t & | vertexCount, | |||
int *& | indices, | |||
size_t & | triangleCount | |||
) | [pure virtual] |
If this collider has a concave mesh geometry then the method will return true and the vertices and triangles of the mesh, otherwise it will return false.
- Parameters:
-
vertices Array of the vertices of the geometry. The array will be deleted and reallocated by this call, you should therefore call 'delete[]' on your array after having used it. vertexCount The number of vertices that have been put in the array. indices Array of the indices of the triangles of the geometry. There are 3 indices per triangle. The indices are put consecutively, so the array is one-dimensional. The array will be deleted and reallocated by this call, you should therefore call 'delete[]' on your array after having used it. triangleCount The number of triangles that have been put in the array of indices.
virtual bool iDynamicsSystemCollider::GetPlaneGeometry | ( | csPlane3 & | plane | ) | [pure virtual] |
If this collider has a plane geometry then the method will return true and the plane, otherwise it will return false.
virtual float iDynamicsSystemCollider::GetSoftness | ( | ) | [pure virtual] |
Get the softness of the collider surface.
virtual bool iDynamicsSystemCollider::GetSphereGeometry | ( | csSphere & | sphere | ) | [pure virtual] |
If this collider has a sphere geometry then the method will return true and the sphere, otherwise it will return false.
virtual csOrthoTransform iDynamicsSystemCollider::GetTransform | ( | ) | [pure virtual] |
Get collider transform (it will always be in world coordinates).
virtual bool iDynamicsSystemCollider::IsStatic | ( | ) | [pure virtual] |
Check if collider is static.
virtual void iDynamicsSystemCollider::MakeDynamic | ( | ) | [pure virtual] |
Make collider dynamic.
Dynamic colliders acts (it collision is checked, and collision callbacks called) on every other collider and body.
virtual void iDynamicsSystemCollider::MakeStatic | ( | ) | [pure virtual] |
Make collider static.
Static collider acts on dynamic colliders and bodies, but ignores other static colliders (it won't do precise collision detection in that case).
virtual void iDynamicsSystemCollider::SetDensity | ( | float | density | ) | [pure virtual] |
Set the density of this collider.
If the mass of the body was not defined through iRigidBody::SetProperties() or iRigidBody::AdjustTotalMass(), then it will be computed from this.
You should be really careful when using densities because most of the game physics libraries do not work well when objects with large mass differences interact. It is safer to artificially keep the mass of moving objects in a safe range (from 1 to 100 kilogram for example).
virtual void iDynamicsSystemCollider::SetElasticity | ( | float | elasticity | ) | [pure virtual] |
Set the elasticity of the collider surface.
virtual void iDynamicsSystemCollider::SetFriction | ( | float | friction | ) | [pure virtual] |
Set the friction of the collider surface.
virtual void iDynamicsSystemCollider::SetSoftness | ( | float | softness | ) | [pure virtual] |
Set the softness of the collider surface.
virtual void iDynamicsSystemCollider::SetTransform | ( | const csOrthoTransform & | trans | ) | [pure virtual] |
Set Collider transform.
If this is a "static" collider then the given transform will be in world space, otherwise it will be in attached rigid body space.
The documentation for this struct was generated from the following file:
- ivaria/dynamics.h
Generated for Crystal Space 2.0 by doxygen 1.6.1