C# Класс BEPUphysics.CollisionShapes.TerrainShape

The local space data needed by a Terrain collidable. Contains the Heightmap and other information.
Наследование: BEPUphysics.CollisionShapes.CollisionShape
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Описание методов

GetBoundingBox() публичный Метод

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.
Результат void

GetLocalPosition() публичный Метод

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
Результат void

GetNormal() публичный Метод

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.
Результат void

GetOverlaps() публичный Метод

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.
Результат bool

GetOverlaps() публичный Метод

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.
Результат bool

GetPosition() публичный Метод

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.
Результат void

GetTriangle() публичный Метод

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.
Результат void

GetTriangle() публичный Метод

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.
Результат void

RayCast() публичный Метод

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.
Результат bool

RayCast() публичный Метод

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.
Результат bool

TerrainShape() публичный Метод

Constructs a TerrainShape.
public TerrainShape ( float heights ) : System
heights float Heights array used for the shape.
Результат System

TerrainShape() публичный Метод

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.
Результат System