C# 클래스 BEPUphysics.CollisionShapes.TerrainShape

The local space data needed by a Terrain collidable. Contains the Heightmap and other information.
상속: BEPUphysics.CollisionShapes.CollisionShape
파일 보기 프로젝트 열기: Indiefreaks/igf 1 사용 예제들

공개 메소드들

메소드 설명
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