载入中...
搜索中...
未找到
eve::physics::Shape3D类 参考

3D shape (box/sphere/capsule) attached to a Body3D with material settings. Created via Body3D::new*Shape; owned by the world. 更多...

#include <Shape3D.h>

Public 类型

enum class  Kind { Box , Sphere , Capsule }
 Shape geometry kind. 更多...
 

Public 成员函数

 Shape3D (World3D *world, Body3D *body, b3ShapeId shapeId, Kind kind, float a, float b, float c)
 Internal: wraps a Box3D shape (use Body3D::new*Shape).
 
 ~Shape3D ()
 
 Shape3D (const Shape3D &)=delete
 
Shape3Doperator= (const Shape3D &)=delete
 
void setSensor (bool sensor)
 Sensor shapes report contacts but never collide.
 
bool isSensor () const
 
void setFriction (float friction)
 Material properties.
 
float getFriction () const
 
void setRestitution (float restitution)
 
float getRestitution () const
 
void setDensity (float density)
 
float getDensity () const
 
Body3DgetBody ()
 Owning body.
 
bool testPoint (float x, float y, float z) const
 Point-in-shape test in world meters.
 
void destroy ()
 Destroys the shape inside its world.
 
b3ShapeId raw () const
 Raw Box3D shape id / liveness.
 
bool isValid () const
 
void invalidate ()
 Internal: marks the wrapper invalid after destruction.
 

友元

class World3D
 
class Body3D
 

详细描述

3D shape (box/sphere/capsule) attached to a Body3D with material settings. Created via Body3D::new*Shape; owned by the world.

在文件 Shape3D.h14 行定义.

成员枚举类型说明

◆ Kind

enum class eve::physics::Shape3D::Kind
strong

Shape geometry kind.

枚举值
Box 
Sphere 
Capsule 

在文件 Shape3D.h17 行定义.

构造及析构函数说明

◆ Shape3D() [1/2]

eve::physics::Shape3D::Shape3D ( World3D world,
Body3D body,
b3ShapeId  shapeId,
Kind  kind,
float  a,
float  b,
float  c 
)

Internal: wraps a Box3D shape (use Body3D::new*Shape).

在文件 Shape3D.cpp25 行定义.

◆ ~Shape3D()

eve::physics::Shape3D::~Shape3D ( )

◆ Shape3D() [2/2]

eve::physics::Shape3D::Shape3D ( const Shape3D )
delete

成员函数说明

◆ destroy()

void eve::physics::Shape3D::destroy ( )

Destroys the shape inside its world.

在文件 Shape3D.cpp49 行定义.

引用了 eve::physics::World3D::forgetShape(), invalidate(), eve::physics::Body3D::isValid() , 以及 isValid().

◆ getBody()

Body3D * eve::physics::Shape3D::getBody ( )
inline

Owning body.

在文件 Shape3D.h42 行定义.

◆ getDensity()

float eve::physics::Shape3D::getDensity ( ) const

在文件 Shape3D.cpp131 行定义.

引用了 isValid().

◆ getFriction()

float eve::physics::Shape3D::getFriction ( ) const

在文件 Shape3D.cpp115 行定义.

引用了 isValid().

◆ getRestitution()

float eve::physics::Shape3D::getRestitution ( ) const

在文件 Shape3D.cpp122 行定义.

引用了 isValid().

◆ invalidate()

void eve::physics::Shape3D::invalidate ( )

Internal: marks the wrapper invalid after destruction.

在文件 Shape3D.cpp42 行定义.

引用了 isValid().

被这些函数引用 destroy().

◆ isSensor()

bool eve::physics::Shape3D::isSensor ( ) const

在文件 Shape3D.cpp108 行定义.

引用了 isValid().

◆ isValid()

bool eve::physics::Shape3D::isValid ( ) const

◆ operator=()

Shape3D & eve::physics::Shape3D::operator= ( const Shape3D )
delete

◆ raw()

b3ShapeId eve::physics::Shape3D::raw ( ) const
inline

Raw Box3D shape id / liveness.

在文件 Shape3D.h51 行定义.

◆ setDensity()

void eve::physics::Shape3D::setDensity ( float  density)

在文件 Shape3D.cpp126 行定义.

引用了 isValid().

◆ setFriction()

void eve::physics::Shape3D::setFriction ( float  friction)

Material properties.

在文件 Shape3D.cpp110 行定义.

引用了 isValid().

◆ setRestitution()

void eve::physics::Shape3D::setRestitution ( float  restitution)

在文件 Shape3D.cpp117 行定义.

引用了 isValid().

◆ setSensor()

void eve::physics::Shape3D::setSensor ( bool  sensor)

Sensor shapes report contacts but never collide.

在文件 Shape3D.cpp102 行定义.

引用了 eve::physics::Body3D::isValid() , 以及 isValid().

◆ testPoint()

bool eve::physics::Shape3D::testPoint ( float  x,
float  y,
float  z 
) const

Point-in-shape test in world meters.

在文件 Shape3D.cpp133 行定义.

引用了 Box, Capsule, eve::physics::Body3D::isValid(), isValid(), eve::physics::Body3D::raw(), Sphere, x, y , 以及 z.

友元及相关函数文档

◆ Body3D

friend class Body3D
friend

在文件 Shape3D.h59 行定义.

◆ World3D

friend class World3D
friend

在文件 Shape3D.h58 行定义.


该类的文档由以下文件生成: