3DRadSpace 0.1.0Alpha
3DRadSpace is a free, simple to use, rapid application development game engine.
Loading...
Searching...
No Matches
Engine3DRadSpace.Objects.Skinmesh Class Reference

Represents a 3D mesh in the scene. More...

#include <Skinmesh.hpp>

Inheritance diagram for Engine3DRadSpace.Objects.Skinmesh:
Collaboration diagram for Engine3DRadSpace.Objects.Skinmesh:

Public Member Functions

 Skinmesh ()
 Skinmesh ()
 Default constructor for the skinmesh object.
 Skinmesh (const std::string &name, bool visible, RefModel3D model, const Math::Vector3 &pos=Math::Vector3::Zero(), const Math::Quaternion &rot=Math::Quaternion(), const Math::Vector3 &pivot=Math::Vector3::Zero(), const Math::Vector3 &scale=Math::Vector3::One())
 Constructor for the skinmesh object using an numerical asset reference.
 Skinmesh (const std::string &name, bool visible, const std::filesystem::path &path, const Math::Vector3 &pos=Math::Vector3::Zero(), const Math::Quaternion &rot=Math::Quaternion(), const Math::Vector3 &pivot=Math::Vector3::Zero(), const Math::Vector3 &scale=Math::Vector3::One())
 Constructor for the skinmesh object using an external model file path.
 Skinmesh (Skinmesh &&) noexcept=default
Skinmesh & operator= (Skinmesh &&) noexcept=default
Graphics::Model3D * GetModel ()
 Gets the underlying mesh.
void Initialize () override
 Initialized the skinmesh object, retrieving necessary services.
void Update () override
 Does nothing.
void Load () override
 Loads the skinmesh model.
void Load (const std::filesystem::path &path) override
 Loads the mesh model from the specified file path.
Reflection::UUID GetUUID () const noexcept override
 Gets the unique identifier for the Skinmesh type.
void Draw3D () override
 Draws the associated mesh.
float Intersects (const Math::Ray &r) const override
 Returns the distance from the ray to the mesh. NaN if there is no intersection.
Gizmos::IGizmo * GetGizmo () const noexcept override
 Returns the associated gizmo for the skinmesh.
virtual Math::BoundingBox GetBoundingBox () const noexcept override
 Returns the bounding box of the skinmesh.
 ~Skinmesh () override=default
Public Member Functions inherited from Engine3DRadSpace.Objects.InstIObject3D
Matrix4x4 GetModelMatrix ()
float? Intersects (Ray ray)
 InstIObject3D (IntPtr natPtr)
Public Member Functions inherited from Engine3DRadSpace.NatPtrWrapper
virtual void Dispose ()
Public Member Functions inherited from Engine3DRadSpace.Objects.IObject3D
Matrix4x4 GetModelMatrix ()
float? Intersects (Ray ray)
virtual Math::Matrix4x4 GetModelMatrix () const
 Gets the world matrix of this object, considering the entire hierarchy of parent objects.
virtual Math::Matrix4x4 GetLocalMatrix () const
 Gets the local transformation matrix of this object, considering only its own position, rotation, and scale.
 ~IObject3D ()=default
Public Member Functions inherited from Engine3DRadSpace.Objects.IObject
void Enable ()
void Disable ()
bool Switch ()
void Show ()
void Hide ()
bool SwitchVisibility ()
IObject GetChild (int idx)
int GetChildrenCount ()
void InternalInitialize (IGame *game)
 Called by ObjectsList to set the _game Game instance. If there are objects manually managed, this MUST be called before Initialize or EditorInitialize.
Graphics::IGraphicsDevice * GetGraphicsDeviceHandle () const noexcept
 Returns the graphics device handle associated with this object.
IGame * GetGame () const noexcept
 Gets the game that this object belongs to.
IObject * operator[] (size_t idxChild) const
 Returns the idx-th child of this object.
IObject * GetParent () const noexcept
 Returns the parent of this object.
void SetParent (IObject *newParent) noexcept
 Sets the parent of this object.
bool HasParent () const noexcept
 Checks if this object has a parent.
size_t GetChildrenCount () const noexcept
 Returns the number of children of this object.
virtual void Enable ()
 Enables this object.
virtual void Disable ()
 Disables this object.
virtual bool Switch ()
 Switched the enable/disable state of this object.
virtual void Show ()
 Shows this object.
virtual void Hide ()
 Hides this object.
virtual bool SwitchVisibility ()
 Switches the visibility state of this object.
void Uninitialize () override
 Called before the object has the destructor called.
virtual ~IObject ()
Public Member Functions inherited from Engine3DRadSpace.IInitializable
void Initialize ()
virtual ~IInitializable ()=default
Public Member Functions inherited from Engine3DRadSpace.IUpdateable
void Update ()
virtual ~IUpdateable ()=default
Public Member Functions inherited from Engine3DRadSpace.ILoadable
void Load ()
void Load (string path)
virtual ~ILoadable ()=default
Public Member Functions inherited from Engine3DRadSpace.IDrawable3D
void Draw3D ()
virtual ~IDrawable3D ()=default

Public Attributes

RefModel3D Model
 Numerical asset reference for the model associated with this skinmesh.
bool HasShadows = true
 Does this object emit shadows?
bool Transparent = false
 If true, the skinmesh will be rendered after all opaque objects.
Public Attributes inherited from Engine3DRadSpace.Objects.IObject3D
Math::Vector3 Position
 Position in world space of this object.
Math::Vector3 RotationCenter
 Rotation pivot.
Math::Quaternion Rotation
 Rotation of this object. Default is (0,0,0,1) (identity quaternion).
Math::Vector3 Scale
 Scale of this object. Default is (1,1,1).
bool PostRender = false
 Forces a second draw pass after the main rendering passes completes.
Public Attributes inherited from Engine3DRadSpace.Objects.IObject
std::string Name
 Name of the object.
ChildObjectCollection Children
 Children of this object.

Properties

uint Model [get, set]
Properties inherited from Engine3DRadSpace.Objects.InstIObject3D
Vector3 Position [get, set]
Vector3 RotationCenter [get, set]
Quaternion Rotation [get, set]
Vector3 Scale [get, set]
Properties inherited from Engine3DRadSpace.NatPtrWrapper
IntPtr Handle [get]
Properties inherited from Engine3DRadSpace.Objects.IObject3D
Vector3 Position [get, set]
Vector3 RotationCenter [get, set]
Quaternion Rotation [get, set]
Vector3 Scale [get, set]
Properties inherited from Engine3DRadSpace.Objects.IObject
string Name [get, set]
bool Enabled [get, set]
 Is this object enabled?
bool Visible [get, set]
 Is this object visible?
Reflection.UUID UUID [get]
IGame Game [get]
IGraphicsDevice GraphicsDevice [get]
IGizmo Gizmo [get]
ObjectCollection Children [get]
IObject Parent [get, set]

Additional Inherited Members

Protected Member Functions inherited from Engine3DRadSpace.NatPtrWrapper
 NatPtrWrapper (IntPtr handle, Action< IntPtr > fnDestroy)
 NatPtrWrapper (Action< IntPtr > fnDestroy)
void Reset (IntPtr newObj)
void Dispose (bool disposing)
Protected Member Functions inherited from Engine3DRadSpace.Objects.IObject3D
 IObject3D (const std::string &name="", bool enabled=false, bool visible=false, const Math::Vector3 &pos=Math::Vector3::Zero(), const Math::Vector3 &pivot=Math::Vector3::Zero(), const Math::Quaternion &rotation=Math::Quaternion(), const Math::Vector3 &scale=Math::Vector3::One())
 IObject3D (const IObject3D &) noexcept=delete
IObject3D & operator= (const IObject3D &) noexcept=delete
 IObject3D (IObject3D &&) noexcept=default
IObject3D & operator= (IObject3D &&) noexcept=default
Protected Member Functions inherited from Engine3DRadSpace.Objects.IObject
 IObject (const std::string &name="Empty", bool enabled=false, bool visible=false)
 Default constructor used for reflection. Objects created with this constructor are initially invalid, until internalInitialize() is called.
 IObject (const IObject &) noexcept=delete
IObject & operator= (const IObject &) noexcept=delete
 IObject (IObject &&) noexcept=default
IObject & operator= (IObject &&) noexcept=default
Protected Member Functions inherited from Engine3DRadSpace.IInitializable
 IInitializable ()=default
 IInitializable (const IInitializable &) noexcept=default
IInitializable & operator= (const IInitializable &) noexcept=default
 IInitializable (IInitializable &&) noexcept=default
IInitializable & operator= (IInitializable &&) noexcept=default
Protected Member Functions inherited from Engine3DRadSpace.IUpdateable
 IUpdateable ()=default
 IUpdateable (const IUpdateable &) noexcept=default
IUpdateable & operator= (const IUpdateable &) noexcept=default
 IUpdateable (IUpdateable &&) noexcept=default
IUpdateable & operator= (IUpdateable &&) noexcept=default
Protected Member Functions inherited from Engine3DRadSpace.ILoadable
 ILoadable ()=default
 ILoadable (const ILoadable &) noexcept=default
ILoadable & operator= (const ILoadable &) noexcept=default
 ILoadable (ILoadable &&) noexcept=default
ILoadable & operator= (ILoadable &&) noexcept=default
Protected Member Functions inherited from Engine3DRadSpace.IDrawable3D
 IDrawable3D ()=default
 IDrawable3D (const IDrawable3D &)=default
IDrawable3D & operator= (const IDrawable3D &)=default
 IDrawable3D (IDrawable3D &&) noexcept=default
IDrawable3D & operator= (IDrawable3D &&) noexcept=default
Protected Attributes inherited from Engine3DRadSpace.NatPtrWrapper
IntPtr _handle
bool _disposed
Protected Attributes inherited from Engine3DRadSpace.Objects.IObject
IGame * _game = nullptr
Graphics::IGraphicsDevice * _device = nullptr
IObject * _parent = nullptr

Detailed Description

Represents a 3D mesh in the scene.

Constructor & Destructor Documentation

◆ Skinmesh() [1/5]

Skinmesh.Skinmesh ( )
inline

◆ Skinmesh() [2/5]

Default constructor for the skinmesh object.

◆ Skinmesh() [3/5]

Engine3DRadSpace.Objects.Skinmesh.Skinmesh ( const std::string & name,
bool visible,
RefModel3D model,
const Math::Vector3 & pos = Math::Vector3::Zero(),
const Math::Quaternion & rot = Math::Quaternion(),
const Math::Vector3 & pivot = Math::Vector3::Zero(),
const Math::Vector3 & scale = Math::Vector3::One() )

Constructor for the skinmesh object using an numerical asset reference.

Parameters
nameThe name of the skinmesh object.
visibleWhether the skinmesh is visible.
modelThe numerical asset reference for the model.
posThe position of the skinmesh.
rotThe rotation of the skinmesh.
pivotThe pivot point of the skinmesh.
scaleThe scale of the skinmesh.

◆ Skinmesh() [4/5]

Engine3DRadSpace.Objects.Skinmesh.Skinmesh ( const std::string & name,
bool visible,
const std::filesystem::path & path,
const Math::Vector3 & pos = Math::Vector3::Zero(),
const Math::Quaternion & rot = Math::Quaternion(),
const Math::Vector3 & pivot = Math::Vector3::Zero(),
const Math::Vector3 & scale = Math::Vector3::One() )

Constructor for the skinmesh object using an external model file path.

Parameters
nameThe name of the skinmesh object.
visibleWhether the skinmesh is visible.
pathThe file path to the external model.
posThe position of the skinmesh.
rotThe rotation of the skinmesh.
pivotThe pivot point of the skinmesh.
scaleThe scale of the skinmesh.

◆ Skinmesh() [5/5]

◆ ~Skinmesh()

Engine3DRadSpace.Objects.Skinmesh.~Skinmesh ( )
overridedefault

Member Function Documentation

◆ Draw3D()

void Skinmesh::Draw3D ( )
overridevirtual

Draws the associated mesh.

Implements Engine3DRadSpace.IDrawable3D.

◆ GetBoundingBox()

BoundingBox Skinmesh::GetBoundingBox ( ) const
overridevirtualnoexcept

Returns the bounding box of the skinmesh.

Returns
The bounding box of the skinmesh.

Reimplemented from Engine3DRadSpace.Objects.IObject3D.

◆ GetGizmo()

Gizmos::IGizmo * Skinmesh::GetGizmo ( ) const
overridevirtualnoexcept

Returns the associated gizmo for the skinmesh.

Returns
The associated gizmo for the skinmesh.

Implements Engine3DRadSpace.Objects.IObject.

◆ GetModel()

Model3D * Skinmesh::GetModel ( )

Gets the underlying mesh.

Returns
Unredlying mesh.

◆ GetUUID()

Reflection::UUID Skinmesh::GetUUID ( ) const
overridevirtualnoexcept

Gets the unique identifier for the Skinmesh type.

Returns
{C3A243F6-23E2-437F-AE8A-B8E8C2A6E944}

Implements Engine3DRadSpace.Objects.IObject.

◆ Initialize()

void Skinmesh::Initialize ( )
overridevirtual

Initialized the skinmesh object, retrieving necessary services.

Implements Engine3DRadSpace.IInitializable.

◆ Intersects()

float Skinmesh::Intersects ( const Math::Ray & r) const
overridevirtual

Returns the distance from the ray to the mesh. NaN if there is no intersection.

Parameters
rThe ray to test for intersection.
Returns
The distance from the ray to the mesh, or NaN if there is no intersection.

Implements Engine3DRadSpace.Objects.IObject3D.

◆ Load() [1/2]

void Skinmesh::Load ( )
overridevirtual

Loads the skinmesh model.

Implements Engine3DRadSpace.ILoadable.

◆ Load() [2/2]

void Skinmesh::Load ( const std::filesystem::path & path)
overridevirtual

Loads the mesh model from the specified file path.

Parameters
path

Implements Engine3DRadSpace.ILoadable.

◆ operator=()

Skinmesh & Engine3DRadSpace.Objects.Skinmesh.operator= ( Skinmesh && )
defaultnoexcept

◆ Update()

void Skinmesh::Update ( )
overridevirtual

Does nothing.

Implements Engine3DRadSpace.IUpdateable.

Member Data Documentation

◆ HasShadows

bool Engine3DRadSpace.Objects.Skinmesh.HasShadows = true

Does this object emit shadows?

◆ Model

Numerical asset reference for the model associated with this skinmesh.

◆ Transparent

bool Engine3DRadSpace.Objects.Skinmesh.Transparent = false

If true, the skinmesh will be rendered after all opaque objects.

Property Documentation

◆ Model

uint Engine3DRadSpace.Objects.Skinmesh.Model
getset

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