C# Class BEPUphysics.CollisionShapes.TerrainShape

The local space data needed by a Terrain collidable. Contains the Heightmap and other information.
Inheritance: BEPUphysics.CollisionShapes.CollisionShape
Afficher le fichier Open project: Indiefreaks/igf Class Usage Examples

Méthodes publiques

Méthode Description
GetBoundingBox ( AffineTransform &transform, BoundingBox &boundingBox ) : void

Constructs the bounding box of the terrain given a transform.

GetLocalPosition ( int i, int j, Vector3 &v ) : void

Gets the position of a vertex at the given indices in local space.

GetNormal ( int i, int j, AffineTransform &transform, Vector3 &normal ) : void

Gets the world space normal at the given indices.

GetOverlaps ( BoundingBox localSpaceBoundingBox, RawList overlappedTriangles ) : bool

Gets overlapped triangles with the terrain shape with a bounding box in the local space of the shape.

GetOverlaps ( BoundingBox localBoundingBox, RawList overlappedElements ) : bool

Gets overlapped triangles with the terrain shape with a bounding box in the local space of the shape.

GetPosition ( int i, int j, AffineTransform &transform, Vector3 &position ) : void

Gets the world space position of a vertex in the terrain at the given indices.

GetTriangle ( TriangleMeshConvexContactManifold &indices, AffineTransform &transform, Vector3 &a, Vector3 &b, Vector3 &c ) : void

Gets a world space triangle in the terrain at the given indices (as if it were a mesh).

GetTriangle ( int index, AffineTransform &transform, Vector3 &a, Vector3 &b, Vector3 &c ) : void

Gets a world space triangle in the terrain at the given triangle index.

RayCast ( Ray &ray, float maximumLength, AffineTransform &transform, RayHit &hit ) : bool

Tests a ray against the terrain shape.

RayCast ( Ray &ray, float maximumLength, AffineTransform &transform, TriangleSidedness sidedness, RayHit &hit ) : bool

Tests a ray against the terrain shape.

TerrainShape ( float heights ) : System

Constructs a TerrainShape.

TerrainShape ( float heights, QuadTriangleOrganization triangleOrganization ) : System

Constructs a TerrainShape.

Method Details

GetBoundingBox() public méthode

Constructs the bounding box of the terrain given a transform.
public GetBoundingBox ( AffineTransform &transform, BoundingBox &boundingBox ) : void
transform BEPUutilities.AffineTransform Transform to apply to the terrain during the bounding box calculation.
boundingBox BoundingBox Bounding box of the terrain shape when transformed.
Résultat void

GetLocalPosition() public méthode

Gets the position of a vertex at the given indices in local space.
public GetLocalPosition ( int i, int j, Vector3 &v ) : void
i int Index in the first dimension.
j int Index in the second dimension.
v Vector3 Local space position at the given vertice.s
Résultat void

GetNormal() public méthode

Gets the world space normal at the given indices.
public GetNormal ( int i, int j, AffineTransform &transform, Vector3 &normal ) : void
i int Index in the first dimension.
j int Index in the second dimension.
transform BEPUutilities.AffineTransform Transform to apply to the terrain while computing the normal.
normal Vector3 World space normal at the given indices.
Résultat void

GetOverlaps() public méthode

Gets overlapped triangles with the terrain shape with a bounding box in the local space of the shape.
public GetOverlaps ( BoundingBox localSpaceBoundingBox, RawList overlappedTriangles ) : bool
localSpaceBoundingBox BoundingBox Bounding box in the local space of the terrain shape.
overlappedTriangles RawList Triangles whose bounding boxes overlap the input bounding box.
Résultat bool

GetOverlaps() public méthode

Gets overlapped triangles with the terrain shape with a bounding box in the local space of the shape.
public GetOverlaps ( BoundingBox localBoundingBox, RawList overlappedElements ) : bool
localBoundingBox BoundingBox Bounding box in the local space of the terrain shape.
overlappedElements RawList Indices of elements whose bounding boxes overlap the input bounding box.
Résultat bool

GetPosition() public méthode

Gets the world space position of a vertex in the terrain at the given indices.
public GetPosition ( int i, int j, AffineTransform &transform, Vector3 &position ) : void
i int Index in the first dimension.
j int Index in the second dimension.
transform BEPUutilities.AffineTransform Transform to apply to the vertex.
position Vector3 Transformed position of the vertex at the given indices.
Résultat void

GetTriangle() public méthode

Gets a world space triangle in the terrain at the given indices (as if it were a mesh).
public GetTriangle ( TriangleMeshConvexContactManifold &indices, AffineTransform &transform, Vector3 &a, Vector3 &b, Vector3 &c ) : void
indices TriangleMeshConvexContactManifold Indices of the triangle.
transform BEPUutilities.AffineTransform Transform to apply to the triangle vertices.
a Vector3 First vertex of the triangle.
b Vector3 Second vertex of the triangle.
c Vector3 Third vertex of the triangle.
Résultat void

GetTriangle() public méthode

Gets a world space triangle in the terrain at the given triangle index.
public GetTriangle ( int index, AffineTransform &transform, Vector3 &a, Vector3 &b, Vector3 &c ) : void
index int Index of the triangle.
transform AffineTransform Transform to apply to the triangle vertices.
a Vector3 First vertex of the triangle.
b Vector3 Second vertex of the triangle.
c Vector3 Third vertex of the triangle.
Résultat void

RayCast() public méthode

Tests a ray against the terrain shape.
public RayCast ( Ray &ray, float maximumLength, AffineTransform &transform, RayHit &hit ) : bool
ray Ray Ray to test against the shape.
maximumLength float Maximum length of the ray in units of the ray direction's length.
transform AffineTransform Transform to apply to the terrain shape during the test.
hit RayHit Hit data of the ray cast, if any.
Résultat bool

RayCast() public méthode

Tests a ray against the terrain shape.
public RayCast ( Ray &ray, float maximumLength, AffineTransform &transform, TriangleSidedness sidedness, RayHit &hit ) : bool
ray Ray Ray to test against the shape.
maximumLength float Maximum length of the ray in units of the ray direction's length.
transform AffineTransform Transform to apply to the terrain shape during the test.
sidedness TriangleSidedness Sidedness of the triangles to use when raycasting.
hit RayHit Hit data of the ray cast, if any.
Résultat bool

TerrainShape() public méthode

Constructs a TerrainShape.
public TerrainShape ( float heights ) : System
heights float Heights array used for the shape.
Résultat System

TerrainShape() public méthode

Constructs a TerrainShape.
Thrown if the heights array has less than 2x2 vertices.
public TerrainShape ( float heights, QuadTriangleOrganization triangleOrganization ) : System
heights float Heights array used for the shape.
triangleOrganization QuadTriangleOrganization Triangle organization of each quad.
Résultat System