Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Ndk::CollisionComponent3D Class Reference

NDK class that represents the component for collision (meant for static objects) More...

Inherits Ndk::Component< ComponentType >.

Public Member Functions

 CollisionComponent3D (Nz::Collider3DRef geom=Nz::Collider3DRef())
 Constructs a CollisionComponent3D object with a geometry. More...
 
 CollisionComponent3D (const CollisionComponent3D &collision)
 Constructs a CollisionComponent3D object by copy semantic. More...
 
const Nz::Collider3DRefGetGeom () const
 Gets the geometry representing the entity. More...
 
void SetGeom (Nz::Collider3DRef geom)
 Sets geometry for the entity. More...
 
CollisionComponent3Doperator= (Nz::Collider3DRef geom)
 Assigns the geometry to this component. More...
 
CollisionComponent3Doperator= (CollisionComponent3D &&collision)=default
 

Static Public Attributes

static ComponentIndex componentIndex
 

Friends

class PhysicsSystem3D
 

Detailed Description

NDK class that represents the component for collision (meant for static objects)

Constructor & Destructor Documentation

◆ CollisionComponent3D() [1/2]

Ndk::CollisionComponent3D::CollisionComponent3D ( Nz::Collider3DRef  geom = Nz::Collider3DRef())
inline

Constructs a CollisionComponent3D object with a geometry.

Parameters
geomReference to a geometry symbolizing the entity

◆ CollisionComponent3D() [2/2]

Ndk::CollisionComponent3D::CollisionComponent3D ( const CollisionComponent3D collision)
inline

Constructs a CollisionComponent3D object by copy semantic.

Parameters
collisionCollisionComponent3D to copy

Member Function Documentation

◆ GetGeom()

const Nz::Collider3DRef & Ndk::CollisionComponent3D::GetGeom ( ) const
inline

Gets the geometry representing the entity.

Returns
A constant reference to the physics geometry

◆ operator=()

CollisionComponent3D & Ndk::CollisionComponent3D::operator= ( Nz::Collider3DRef  geom)
inline

Assigns the geometry to this component.

Returns
A reference to this
Parameters
geomReference to a geometry symbolizing the entity

◆ SetGeom()

void Ndk::CollisionComponent3D::SetGeom ( Nz::Collider3DRef  geom)

Sets geometry for the entity.

Parameters
geomGeometry used for collisions
Remarks
Produces a NazaraAssert if the entity has no physics component and has no static body

The documentation for this class was generated from the following files: