Mondschein Engine  0.3.0
Static Public Member Functions | List of all members
mondschein::Core Class Reference

This class provides some standard creation functions. More...

#include <types.h>

Static Public Member Functions

static scene::Camera_p create_camera ()
 Create a camera scenenode. More...
 
static scene::Camera_p create_camera (const std::string &_id, float64 _v, float64 _a, float64 _n, float64 _f, float64 _x, float64 _y, float64 _w, float64 _h)
 Create a ca,era. More...
 
static scene::Camera_p create_camera (scene::Camera_c _c)
 Create a camera. More...
 
static scene::Light_p create_light ()
 Create a light. More...
 
static scene::Light_p create_light (const std::string &_id, const Eigen::Vector4d &_a, const Eigen::Vector4d &_d, const Eigen::Vector4d &_s, const Eigen::Vector4d &_p, const Eigen::Vector4d &_sd, float64 _se, float64 _sc, float64 _ca, float64 _la, float64 _qa, uint8 _l)
 Create a light. More...
 
static scene::Light_p create_light (scene::Light_c _l)
 Create a light. More...
 
static scene::Material_p create_material ()
 Create a colour material. More...
 
static scene::Material_p create_material (const std::string &_id, const Eigen::Vector4d &_a, const Eigen::Vector4d &_d, const Eigen::Vector4d &_s, const Eigen::Vector4d &_e, float64 _sh)
 Create a colour material. More...
 
static scene::Material_p create_material (scene::Material_c _m)
 Create a colour material. More...
 
static scene::Mesh_p create_mesh ()
 Create a mesh. More...
 
static scene::Mesh_p create_mesh (const std::string &_id, const std::vector< Eigen::Vector4d > &_v, const std::vector< Eigen::Vector3d > &_vn, const std::vector< Eigen::Vector4d > &_vt, const std::vector< Eigen::Vector4d > &_vc)
 Create a mesh. More...
 
static scene::Mesh_p create_mesh (scene::Mesh_c _m)
 Create a mesh. More...
 
static scene::Pose_p create_pose ()
 Create a pose. More...
 
static scene::Pose_p create_pose (const std::string &_id, const Eigen::Matrix4d &_m)
 Create a pose. More...
 
static scene::Pose_p create_pose (scene::Pose_c _p)
 Create a pose. More...
 
static scene::Texture_p create_texture ()
 Create a texture. More...
 
static scene::Texture_p create_texture (const std::string &_id, uint32 _w, uint32 _h, uint8 _bpp, bool _f, texture_filtering_e _tf, uint8 _af, uint8 _tu, const std::vector< uint8 > &_d)
 Create a texture. More...
 
static scene::Texture_p create_texture (scene::Texture_c _t)
 Create a texture. More...
 
static scene::Scenegraph_p create_scenegraph ()
 Create a scenegraph. More...
 
static scene::Scenegraph_p create_scenegraph (const std::vector< scene::Scenenode_c > &_n, const boost::adjacency_list<> &_e)
 Create a scenegraph. More...
 
static scene::Scenegraph_p create_scenegraph (scene::Scenegraph_c _sg)
 Create a scenegraph. More...
 
static math::Beziercurve_p create_beziercurve ()
 Create a bezier curve. More...
 
static math::Beziercurve_p create_beziercurve (const std::vector< Eigen::Vector4d > &_p)
 Create a bezier curve. More...
 
static math::Beziercurve_p create_beziercurve (math::Beziercurve_c _c)
 Create a bezier curve. More...
 
static math::Bezierpatch_p create_bezierpatch ()
 Create a bezier patch. More...
 
static math::Bezierpatch_p create_bezierpatch (const std::vector< math::Beziercurve_p > &_c)
 Create a bezier patch. More...
 
static math::Bezierpatch_p create_bezierpatch (math::Bezierpatch_c _p)
 Create a bezier patch. More...
 
static math::NURBScurve_p create_nurbscurve ()
 Create a NURBS curve. More...
 
static math::NURBScurve_p create_nurbscurve (uint32 _d, const std::vector< Eigen::Vector4d > &_p, bool _cl)
 Create a NURBS curve. More...
 
static math::NURBScurve_p create_nurbscurve (math::NURBScurve_c _c)
 Create a NURBS curve. More...
 
static math::NURBSpatch_p create_nurbspatch ()
 Create a NURBS patch. More...
 
static math::NURBSpatch_p create_nurbspatch (uint32 _d, const std::vector< math::NURBScurve_p > &_c, bool _cl)
 Create a NURBS patch. More...
 
static math::NURBSpatch_p create_nurbspatch (math::NURBSpatch_c _p)
 Create a NURBS patch. More...
 

Detailed Description

This class provides some standard creation functions.

The Core class is a convenience class that provides a set of useful functions to ease scenenode and other object creation. Supported classes are:
Camera
Light
Material
Mesh
Pose
Texture
Scenegraph
Beziercurve
Bezierpatch
NURBScurve
NURBSpatch

Definition at line 458 of file types.h.

Member Function Documentation

math::Beziercurve_p Core::create_beziercurve ( )
static

Create a bezier curve.

Returns
an empty bezier curve

This function creates an empty bezier curve object.

Definition at line 149 of file mondschein_core.cpp.

math::Beziercurve_p Core::create_beziercurve ( const std::vector< Eigen::Vector4d > &  _p)
static

Create a bezier curve.

Parameters
_pthe control points
Returns
a bezier curve object

This function creates a bezier curve with control points _m and degree _m.size()-1.

Definition at line 154 of file mondschein_core.cpp.

math::Beziercurve_p Core::create_beziercurve ( math::Beziercurve_c  _c)
static

Create a bezier curve.

Parameters
_cthe bezier curve to copy
Returns
a copy of _c

Thhis function creates a bezier curve object which is an exact copy of _c.

Definition at line 159 of file mondschein_core.cpp.

math::Bezierpatch_p Core::create_bezierpatch ( )
static

Create a bezier patch.

Returns
an empty bezier patch

This function creates an empty bezier patch.

Definition at line 164 of file mondschein_core.cpp.

math::Bezierpatch_p Core::create_bezierpatch ( const std::vector< math::Beziercurve_p > &  _c)
static

Create a bezier patch.

Parameters
_cthe control curves
Returns
a bezier patch object

This function creates a bezier patch objects with control curves _c and degree _c.size()-1.

Definition at line 169 of file mondschein_core.cpp.

math::Bezierpatch_p Core::create_bezierpatch ( math::Bezierpatch_c  _p)
static

Create a bezier patch.

Parameters
_pthe bezier patch to copy
Returns
a copy of _p

This function creates a bezier patch which is an exact copy of _p.

Definition at line 174 of file mondschein_core.cpp.

scene::Camera_p Core::create_camera ( )
static

Create a camera scenenode.

Returns
a standard camera scenenode

This function creates a standard camera scenenode object and returns it.

Definition at line 36 of file mondschein_core.cpp.

scene::Camera_p Core::create_camera ( const std::string &  _id,
float64  _v,
float64  _a,
float64  _n,
float64  _f,
float64  _x,
float64  _y,
float64  _w,
float64  _h 
)
static

Create a ca,era.

Parameters
_vthe field of view in Y-direction
_aTte aspect ratio
_nThe near clipping plane
_fthe far clipping plane
_xthe viewport X coordinate
_ythe viewport Y coordinate
_wthe viewport width
_wthe viewport height
Returns
the newly constructed camera scenenode

This function constructs a custom camera and returns its object.

Definition at line 41 of file mondschein_core.cpp.

scene::Camera_p Core::create_camera ( scene::Camera_c  _c)
static

Create a camera.

Parameters
_cthe camera to copy
Returns
a copy of _c

This function constructs a camera that is a copy of _c and returns its object.

Definition at line 47 of file mondschein_core.cpp.

scene::Light_p Core::create_light ( )
static

Create a light.

Returns
a standard light scenenode

This function creates a light scene nodes according to the standard scenenode defaults.

Definition at line 52 of file mondschein_core.cpp.

scene::Light_p Core::create_light ( const std::string &  _id,
const Eigen::Vector4d &  _a,
const Eigen::Vector4d &  _d,
const Eigen::Vector4d &  _s,
const Eigen::Vector4d &  _p,
const Eigen::Vector4d &  _sd,
float64  _se,
float64  _sc,
float64  _ca,
float64  _la,
float64  _qa,
uint8  _l 
)
static

Create a light.

Parameters
_athe ambient light colour
_dthe diffuse light colour
_sthe specular light colour
_pthe light position
_sdthe spot light direction
_sethe spot light exponent
_scthe spot light cutoff
_cathe constant light attenuation
_lathe linear light attenuation
_qathe quadratic light attenuation
_lthe light unit
Returns
a custom light scenenode

This function creates a light scenenode according to the given parameters.

Definition at line 57 of file mondschein_core.cpp.

scene::Light_p Core::create_light ( scene::Light_c  _l)
static

Create a light.

Parameters
_lthe light scenenode to copy
Returns
a copy of _l

This function creates a light scenenode which is an exact copy of _l.

Definition at line 64 of file mondschein_core.cpp.

scene::Material_p Core::create_material ( )
static

Create a colour material.

Returns
a standard colour material

This function creates a colour material scenenode according to the standard scenenode defaults.

Definition at line 69 of file mondschein_core.cpp.

scene::Material_p Core::create_material ( const std::string &  _id,
const Eigen::Vector4d &  _a,
const Eigen::Vector4d &  _d,
const Eigen::Vector4d &  _s,
const Eigen::Vector4d &  _e,
float64  _sh 
)
static

Create a colour material.

Parameters
_athe ambient material colour
_dthe diffuse material colour
_sthe specular material colour
_ethe pseudo-light emission colour
_shthe material shininess
Returns
a custom colour material scenenode

This function creates a colour material according to the given parameters.

Definition at line 74 of file mondschein_core.cpp.

scene::Material_p Core::create_material ( scene::Material_c  _m)
static

Create a colour material.

Parameters
_mthe colour material scenenode to copy
Returns
a copy of _m

This function creates a colour material which is an exact copy of _m.

Definition at line 80 of file mondschein_core.cpp.

scene::Mesh_p Core::create_mesh ( )
static

Create a mesh.

Returns
a standard mesh scenenode

This function creates a mesh scenenode according to the scenenode defaults.

Definition at line 85 of file mondschein_core.cpp.

scene::Mesh_p Core::create_mesh ( const std::string &  _id,
const std::vector< Eigen::Vector4d > &  _v,
const std::vector< Eigen::Vector3d > &  _vn,
const std::vector< Eigen::Vector4d > &  _vt,
const std::vector< Eigen::Vector4d > &  _vc 
)
static

Create a mesh.

Parameters
_vthe vertex position array
_vnthe vertex normal array
_vtthe vertex texture coordinates array
_vcthe vertex colour array
Returns
a custom mesh scenenode

This function creates a mesh scenenode according to the given parameters.

Definition at line 90 of file mondschein_core.cpp.

scene::Mesh_p Core::create_mesh ( scene::Mesh_c  _m)
static

Create a mesh.

Parameters
_mthe mesh scenenode to copy
Returns
a copy of _m

This function creates a mesh scenenode which is an exact copy of _m.

Definition at line 97 of file mondschein_core.cpp.

math::NURBScurve_p Core::create_nurbscurve ( )
static

Create a NURBS curve.

Returns
an empty NURBS curve object

This function creates an empty NURBS curve object with degree 1. After setting control points the knot vector must be calculated.

Definition at line 179 of file mondschein_core.cpp.

math::NURBScurve_p Core::create_nurbscurve ( uint32  _d,
const std::vector< Eigen::Vector4d > &  _p,
bool  _cl 
)
static

Create a NURBS curve.

Parameters
_dthe curve degree
_pthe control points
_clthe knot vector calculation option (true for chord length, false for uniform length)
Returns
a NURBS curve object

This function creates a NURBS curve object with control points _p and degree _d and calculates the knot vector according to _cl.

Definition at line 184 of file mondschein_core.cpp.

math::NURBScurve_p Core::create_nurbscurve ( math::NURBScurve_c  _c)
static

Create a NURBS curve.

Parameters
_cthe NURBS curve to copy
Returns
a cpy of _c

This function creates a NURBS curve object which is an exact copy of _c.

Definition at line 191 of file mondschein_core.cpp.

math::NURBSpatch_p Core::create_nurbspatch ( )
static

Create a NURBS patch.

Returns
an empty NURBS patch object

This function creates an empty NURBS patch object with degree 1. After setting control curves the knot vector must be calculated.

Definition at line 196 of file mondschein_core.cpp.

math::NURBSpatch_p Core::create_nurbspatch ( uint32  _d,
const std::vector< math::NURBScurve_p > &  _c,
bool  _cl 
)
static

Create a NURBS patch.

Parameters
_dthe patch degree
_cthe control curves
_clthe knot vector calculation option (true for chord length, false for uniform length)
Returns
a NURBS patch object

This function creates a NURBS patch object with control curves _c and degree _d and calculates the knot vector according to _cl.

Definition at line 201 of file mondschein_core.cpp.

math::NURBSpatch_p Core::create_nurbspatch ( math::NURBSpatch_c  _p)
static

Create a NURBS patch.

Parameters
_pthe NURBS patch to copy
Returns
a copy of _p

This function creates a NURBS patch object which is an exact copy of _p.

Definition at line 208 of file mondschein_core.cpp.

scene::Pose_p Core::create_pose ( )
static

Create a pose.

Returns
a standard pose scenenode

This function creates a pose scenenode according to the scenenode defaults.

Definition at line 102 of file mondschein_core.cpp.

scene::Pose_p Core::create_pose ( const std::string &  _id,
const Eigen::Matrix4d &  _m 
)
static

Create a pose.

Parameters
_mthe pose matrix in row-major order
Returns
a pose scenenode

This function creates a pose scenenode with the pose matrix defines by _m.

Definition at line 107 of file mondschein_core.cpp.

scene::Pose_p Core::create_pose ( scene::Pose_c  _p)
static

Create a pose.

Parameters
_pthe pose scenenode to be copied
Returns
a copy of _p

This function creates a pose scenenode which is the exact copy of _p.

Definition at line 112 of file mondschein_core.cpp.

scene::Scenegraph_p Core::create_scenegraph ( )
static

Create a scenegraph.

Returns
a standard scenegraph

This function creates an empty scenegraph according to the scenegraph defaults.

Definition at line 133 of file mondschein_core.cpp.

scene::Scenegraph_p Core::create_scenegraph ( const std::vector< scene::Scenenode_c > &  _n,
const boost::adjacency_list<> &  _e 
)
static

Create a scenegraph.

Parameters
_nthe scenegraph nodes
_ethe scenegraph edges
Returns
a scenegraph

This function creates a scenegraph according to the function parameters.

Definition at line 138 of file mondschein_core.cpp.

scene::Scenegraph_p Core::create_scenegraph ( scene::Scenegraph_c  _sg)
static

Create a scenegraph.

Parameters
_sgthe scenegraph to be copied
Returns
a copy of _sg

This function creates a scenegraph which is an exact copy of _sg.

Definition at line 144 of file mondschein_core.cpp.

scene::Texture_p Core::create_texture ( )
static

Create a texture.

Returns
a standard texture scenenode

This function creates an empty texture scenenode according to the sceneode defaults.

Definition at line 117 of file mondschein_core.cpp.

scene::Texture_p Core::create_texture ( const std::string &  _id,
uint32  _w,
uint32  _h,
uint8  _bpp,
bool  _f,
texture_filtering_e  _tf,
uint8  _af,
uint8  _tu,
const std::vector< uint8 > &  _d 
)
static

Create a texture.

Parameters
_wthe texture width
_hthe texture height
_bppthe texture depth
_fthe texture format
_tfthe texture filter
_afthe anisotropic texture filter
_tuthe texture unit
_dthe texture pixel data
Returns
a texture scenenode

This function creates a texture scenenode according to the function parameters.

Definition at line 122 of file mondschein_core.cpp.

scene::Texture_p Core::create_texture ( scene::Texture_c  _t)
static

Create a texture.

Parameters
_tthe texture scenenode to copy
Returns
a copy of _t

This function creates a texture scenenode which is the exact copy of _t.

Definition at line 128 of file mondschein_core.cpp.


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