Commit 7ce4f251 authored by hybrid's avatar hybrid

Some documentation updates.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@1020 dfc29bdd-3216-0410-991c-e03cc46cb475
parent ce4453fb
...@@ -19,10 +19,10 @@ namespace scene ...@@ -19,10 +19,10 @@ namespace scene
//! Interface to return triangles with specific properties. //! Interface to return triangles with specific properties.
/** Every ISceneNode may have a triangle selector, available with /** Every ISceneNode may have a triangle selector, available with
ISceneNode::getTriangleScelector() or ISceneManager::createTriangleSelector. ISceneNode::getTriangleScelector() or ISceneManager::createTriangleSelector.
This is used for doing collision detection: For example if you know, that a collision may happened in the This is used for doing collision detection: For example if you know, that a
area between (1,1,1) and (10,10,10), you can get all triangles of the collision may have happened in the area between (1,1,1) and (10,10,10), you
scene node in this area with the ITriangleSelector easily and check every triangle can get all triangles of the scene node in this area with the
if it collided. */ ITriangleSelector easily and check every triangle if it collided. */
class ITriangleSelector : public virtual IReferenceCounted class ITriangleSelector : public virtual IReferenceCounted
{ {
public: public:
...@@ -34,44 +34,50 @@ public: ...@@ -34,44 +34,50 @@ public:
virtual s32 getTriangleCount() const = 0; virtual s32 getTriangleCount() const = 0;
//! Gets all triangles. //! Gets all triangles.
//! \param triangles: Array where the resulting triangles will be written to. //! \param triangles: Array where the resulting triangles will be
//! written to.
//! \param arraySize: Size of the target array. //! \param arraySize: Size of the target array.
//! \param outTriangleCount: Amount of triangles which have been written into the //! \param outTriangleCount: Amount of triangles which have been
//! array. //! written into the array.
//! \param transform: Pointer to matrix for transforming the triangles before. //! \param transform: Pointer to matrix for transforming the triangles
//! they are returned. Useful for example to scale all triangles down into an //! before they are returned. Useful for example to scale all triangles
//! ellipsoid space. If this pointer is null, no transformation will be done. //! down into an ellipsoid space. If this pointer is null, no
//! transformation will be done.
virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
s32& outTriangleCount, const core::matrix4* transform=0) const = 0; s32& outTriangleCount, const core::matrix4* transform=0) const = 0;
//! Gets all triangles which lie within a specific bounding box. //! Gets all triangles which lie within a specific bounding box.
//! Please note that unoptimized triangle selectors also may return triangles, //! Please note that unoptimized triangle selectors also may return
//! which are not in the specific box at all. //! triangles which are not in the specific box at all.
//! \param triangles: Array where the resulting triangles will be written to. //! \param triangles: Array where the resulting triangles will be
//! written to.
//! \param arraySize: Size of the target array. //! \param arraySize: Size of the target array.
//! \param outTriangleCount: Amount of triangles which have been written into the //! \param outTriangleCount: Amount of triangles which have been
//! array. //! written into the array.
//! \param box: Only triangles which are in this axis aligned bounding box //! \param box: Only triangles which are in this axis aligned bounding
//! will be written into the array. //! box will be written into the array.
//! \param transform: Pointer to matrix for transforming the triangles before. //! \param transform: Pointer to matrix for transforming the triangles
//! they are returned. Useful for example to scale all triangles down into an //! before they are returned. Useful for example to scale all triangles
//! ellipsoid space. If this pointer is null, no transformation will be done. //! down into an ellipsoid space. If this pointer is null, no
//! transformation will be done.
virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
s32& outTriangleCount, const core::aabbox3d<f32>& box, s32& outTriangleCount, const core::aabbox3d<f32>& box,
const core::matrix4* transform=0) const = 0; const core::matrix4* transform=0) const = 0;
//! Gets all triangles which have or may have contact with a 3d line. //! Gets all triangles which have or may have contact with a 3d line.
//! Please note that unoptimized triangle selectors also may return triangles, //! Please note that unoptimized triangle selectors also may return
//! which are not in contact at all with the 3d line. //! triangles which are not in contact at all with the 3d line.
//! \param triangles: Array where the resulting triangles will be written to. //! \param triangles: Array where the resulting triangles will be
//! written to.
//! \param arraySize: Size of the target array. //! \param arraySize: Size of the target array.
//! \param outTriangleCount: Amount of triangles which have been written into the //! \param outTriangleCount: Amount of triangles which have been
//! array. //! written into the array.
//! \param line: Only triangles which may be in contact with this 3d line will //! \param line: Only triangles which may be in contact with this 3d
//! be written into the array. //! line will be written into the array.
//! \param transform: Pointer to matrix for transforming the triangles before. //! \param transform: Pointer to matrix for transforming the triangles
//! they are returned. Useful for example to scale all triangles down into an //! before they are returned. Useful for example to scale all triangles
//! ellipsoid space. If this pointer is null, no transformation will be done. //! down into an ellipsoid space. If this pointer is null, no
//! transformation will be done.
virtual void getTriangles(core::triangle3df* triangles, s32 arraySize, virtual void getTriangles(core::triangle3df* triangles, s32 arraySize,
s32& outTriangleCount, const core::line3d<f32>& line, s32& outTriangleCount, const core::line3d<f32>& line,
const core::matrix4* transform=0) const = 0; const core::matrix4* transform=0) const = 0;
......
...@@ -351,14 +351,16 @@ namespace video ...@@ -351,14 +351,16 @@ namespace video
u32 vertexCount, const u16* indexList, u32 triangleCount) = 0; u32 vertexCount, const u16* indexList, u32 triangleCount) = 0;
//! Draws a 3d line. //! Draws a 3d line.
/** For some implementations, this method simply calls drawIndexedTriangles for some /** For some implementations, this method simply calls
triangles. Note that the line is drawn using the current transformation drawIndexedTriangles for some triangles.
matrix and material. So if you need to draw the 3D line independently of the Note that the line is drawn using the current transformation
current transformation, use matrix and material. So if you need to draw the 3D line
independently of the current transformation, use
\code \code
driver->setMaterial(unlitMaterial);
driver->setTransform(video::ETS_WORLD, core::matrix4()); driver->setTransform(video::ETS_WORLD, core::matrix4());
\endcode \endcode
before drawing the line. for some properly set up material before drawing the line.
\param start: Start of the 3d line. \param start: Start of the 3d line.
\param end: End of the 3d line. \param end: End of the 3d line.
\param color: Color of the line. */ \param color: Color of the line. */
...@@ -367,19 +369,34 @@ namespace video ...@@ -367,19 +369,34 @@ namespace video
//! Draws a 3d triangle. //! Draws a 3d triangle.
/** This method calls drawIndexedTriangles for some triangles. /** This method calls drawIndexedTriangles for some triangles.
Note that the line is drawn using the current transformation matrix and material. This method works with all drivers because it simply calls
This method works with all drivers because it simply calls drawIndexedTriangleList but drawIndexedTriangleList but is hence not very fast.
is hence not very fast. Note that the triangle is drawn using the current
transformation matrix and material. So if you need to draw it
independently of the current transformation, use
\code
driver->setMaterial(unlitMaterial);
driver->setTransform(video::ETS_WORLD, core::matrix4());
\endcode
for some properly set up material before drawing the triangle.
\param triangle: The triangle to draw. \param triangle: The triangle to draw.
\param color: Color of the line. */ \param color: Color of the line. */
virtual void draw3DTriangle(const core::triangle3df& triangle, virtual void draw3DTriangle(const core::triangle3df& triangle,
SColor color = SColor(255,255,255,255)) = 0; SColor color = SColor(255,255,255,255)) = 0;
//! Draws a 3d axis aligned box. //! Draws a 3d axis aligned box.
/** This method simply calls drawIndexedTriangles for some triangles. /** This method simply calls drawIndexedTriangles for some
Note that the line is drawn using the current transformation matrix and material. triangles. This method works with all drivers because it
This method works with all drivers because it simply calls drawIndexedTriangleList but simply calls drawIndexedTriangleList but is hence not very
is hence not very fast. fast.
Note that the box is drawn using the current transformation
matrix and material. So if you need to draw it independently of
the current transformation, use
\code
driver->setMaterial(unlitMaterial);
driver->setTransform(video::ETS_WORLD, core::matrix4());
\endcode
for some properly set up material before drawing the box.
\param box: The axis aligned box to draw \param box: The axis aligned box to draw
\param color: Color to use while drawing the box. */ \param color: Color to use while drawing the box. */
virtual void draw3DBox(const core::aabbox3d<f32>& box, virtual void draw3DBox(const core::aabbox3d<f32>& box,
......
...@@ -24,7 +24,7 @@ so you can assign unicode to string<c8> and ascii to string<wchar_t> ...@@ -24,7 +24,7 @@ so you can assign unicode to string<c8> and ascii to string<wchar_t>
Note that the conversation between both is not done using an encoding. Note that the conversation between both is not done using an encoding.
Known bugs: Known bugs:
Special characters like 'Ä', 'Ü' and 'Ö' are ignored in the Special characters like umlauts are ignored in the
methods make_upper, make_lower and equals_ignore_case. methods make_upper, make_lower and equals_ignore_case.
*/ */
template <typename T, typename TAlloc = irrAllocator<T> > template <typename T, typename TAlloc = irrAllocator<T> >
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment