Class CoalScenePart#
Defined in File CoalScenePart.h
Inheritance Relationships#
Base Types#
public Karana::Scene::CoalSceneNode(Class CoalSceneNode)public Karana::Scene::CollisionScenePart(Class CollisionScenePart)
Class Documentation#
-
class CoalScenePart : public Karana::Scene::CoalSceneNode, public Karana::Scene::CollisionScenePart#
CollisionScenePart implementation for CoalScene.
Public Functions
-
CoalScenePart(std::string_view name, const VarStaticGeometry &geometry, const VarMaterial &material, layer_t layers, const CoalGeometryCache &geometry_cache, const kc::ks_ptr<Scene> &scene)#
CoalScenePart constructor.
- Parameters:
name – - Name of the CoalScenePart.
geometry – - Geometry of the CoalScenePart.
material – - Material for the CoalScenePart.
layers – - Layers to use for the CoalScenePart.
geometry_cache – - Helper to create native COAL geometries.
scene – - CoalScene to add the part to.
-
~CoalScenePart()#
Destructor.
-
virtual const CollisionInfo &collide(const CollisionScenePart &other, CollisionInfo &result = CollisionInfo::singleton()) const override#
Check for collisions with another part.
- Parameters:
other – - The other CollisionPart
result – - The CollisionInfo instance to store the result in.
- Returns:
The CollisionInfo result.
-
virtual const DistanceInfo &distance(const CollisionScenePart &other, DistanceInfo &result = DistanceInfo::singleton()) const override#
Compute distance from another part.
- Parameters:
other – - The other CollisionPart
result – - The DistanceInfo instance to store the result in.
- Returns:
The DistanceInfo result.
Public Static Functions
-
static kc::ks_ptr<CoalScenePart> create(std::string_view name, const VarStaticGeometry &geometry, const kc::ks_ptr<CoalScene> &scene, const VarMaterial &material = defaultMaterial(), layer_t layers = LAYER_PHYSICAL)#
Create a CoalScenePart.
- Parameters:
name – - Name of the CoalScenePart.
geometry – - Geometry of the CoalScenePart.
scene – - The GraphicalScene to add the CoalScenePart to.
material – - Material for the CoalScenePart.
layers – - Layers to use for the CoalScenePart.
- Returns:
The new CoalScene part.
-
CoalScenePart(std::string_view name, const VarStaticGeometry &geometry, const VarMaterial &material, layer_t layers, const CoalGeometryCache &geometry_cache, const kc::ks_ptr<Scene> &scene)#