mirror of
https://github.com/minetest/irrlicht.git
synced 2025-01-11 18:40:18 +01:00
Spelling fixes
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6456 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
parent
a23af985e4
commit
3a9875cc77
@ -1522,7 +1522,7 @@ Changes in 1.7 (03.02.2010)
|
|||||||
|
|
||||||
- More draw2dimage support in software drivers
|
- More draw2dimage support in software drivers
|
||||||
|
|
||||||
- Sphere node now properly chooses a good tesselation based on the parameters
|
- Sphere node now properly chooses a good tessellation based on the parameters
|
||||||
|
|
||||||
- Active camera not registered twice anymore
|
- Active camera not registered twice anymore
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ namespace scene
|
|||||||
s32 numTags; //number of 'tags' per frame
|
s32 numTags; //number of 'tags' per frame
|
||||||
s32 numMeshes; //number of meshes/skins
|
s32 numMeshes; //number of meshes/skins
|
||||||
s32 numMaxSkins;//maximum number of unique skins used in md3 file. artefact md2
|
s32 numMaxSkins;//maximum number of unique skins used in md3 file. artefact md2
|
||||||
s32 frameStart; //starting position of frame-structur
|
s32 frameStart; //starting position of frame-structure
|
||||||
s32 tagStart; //starting position of tag-structures
|
s32 tagStart; //starting position of tag-structures
|
||||||
s32 tagEnd; //ending position of tag-structures/starting position of mesh-structures
|
s32 tagEnd; //ending position of tag-structures/starting position of mesh-structures
|
||||||
s32 fileSize;
|
s32 fileSize;
|
||||||
|
@ -102,7 +102,7 @@ namespace scene
|
|||||||
zfail method, if not, zpass is used.
|
zfail method, if not, zpass is used.
|
||||||
\param infinity: Value used by the shadow volume algorithm to
|
\param infinity: Value used by the shadow volume algorithm to
|
||||||
scale the shadow volume. For zfail shadow volumes on some drivers
|
scale the shadow volume. For zfail shadow volumes on some drivers
|
||||||
only suppport finite shadows, so camera zfar must be larger than
|
only support finite shadows, so camera zfar must be larger than
|
||||||
shadow back cap,which is depending on the infinity parameter).
|
shadow back cap,which is depending on the infinity parameter).
|
||||||
Infinity value also scales by the scaling factors of the model.
|
Infinity value also scales by the scaling factors of the model.
|
||||||
If shadows don't show up with zfail then try reducing infinity.
|
If shadows don't show up with zfail then try reducing infinity.
|
||||||
|
@ -635,7 +635,7 @@ public:
|
|||||||
//! Adds an attribute as 3d triangle
|
//! Adds an attribute as 3d triangle
|
||||||
virtual void addTriangle3d(const c8* attributeName, const core::triangle3df& v) = 0;
|
virtual void addTriangle3d(const c8* attributeName, const core::triangle3df& v) = 0;
|
||||||
|
|
||||||
//! Sets an attribute as 3d trianle
|
//! Sets an attribute as 3d triangle
|
||||||
virtual void setAttribute(const c8* attributeName, const core::triangle3df& v) = 0;
|
virtual void setAttribute(const c8* attributeName, const core::triangle3df& v) = 0;
|
||||||
|
|
||||||
//! Gets an attribute as a 3d triangle
|
//! Gets an attribute as a 3d triangle
|
||||||
|
@ -26,7 +26,7 @@ namespace gui
|
|||||||
ECI_HELP, // Arrow and question mark
|
ECI_HELP, // Arrow and question mark
|
||||||
ECI_IBEAM, // typical text-selection cursor
|
ECI_IBEAM, // typical text-selection cursor
|
||||||
ECI_NO, // should not click icon
|
ECI_NO, // should not click icon
|
||||||
ECI_WAIT, // hourclass
|
ECI_WAIT, // hourglass
|
||||||
ECI_SIZEALL, // arrow in all directions
|
ECI_SIZEALL, // arrow in all directions
|
||||||
ECI_SIZENESW, // resizes in direction north-east or south-west
|
ECI_SIZENESW, // resizes in direction north-east or south-west
|
||||||
ECI_SIZENWSE, // resizes in direction north-west or south-east
|
ECI_SIZENWSE, // resizes in direction north-west or south-east
|
||||||
|
@ -135,8 +135,8 @@ public:
|
|||||||
|
|
||||||
//! Create an arrow mesh, composed of a cylinder and a cone.
|
//! Create an arrow mesh, composed of a cylinder and a cone.
|
||||||
/**
|
/**
|
||||||
\param tesselationCylinder Number of quads composing the cylinder.
|
\param tessellationCylinder Number of quads composing the cylinder.
|
||||||
\param tesselationCone Number of triangles composing the cone's roof.
|
\param tessellationCone Number of triangles composing the cone's roof.
|
||||||
\param height Total height of the arrow
|
\param height Total height of the arrow
|
||||||
\param cylinderHeight Total height of the cylinder, should be lesser
|
\param cylinderHeight Total height of the cylinder, should be lesser
|
||||||
than total height
|
than total height
|
||||||
@ -147,8 +147,8 @@ public:
|
|||||||
\param colorCone color of the cone
|
\param colorCone color of the cone
|
||||||
\return Generated mesh.
|
\return Generated mesh.
|
||||||
*/
|
*/
|
||||||
virtual IMesh* createArrowMesh(const u32 tesselationCylinder = 4,
|
virtual IMesh* createArrowMesh(const u32 tessellationCylinder = 4,
|
||||||
const u32 tesselationCone = 8, const f32 height = 1.f,
|
const u32 tessellationCone = 8, const f32 height = 1.f,
|
||||||
const f32 cylinderHeight = 0.6f, const f32 widthCylinder = 0.05f,
|
const f32 cylinderHeight = 0.6f, const f32 widthCylinder = 0.05f,
|
||||||
const f32 widthCone = 0.3f, const video::SColor colorCylinder = 0xFFFFFFFF,
|
const f32 widthCone = 0.3f, const video::SColor colorCylinder = 0xFFFFFFFF,
|
||||||
const video::SColor colorCone = 0xFFFFFFFF) const =0;
|
const video::SColor colorCone = 0xFFFFFFFF) const =0;
|
||||||
@ -168,7 +168,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
\param radius Radius of the cylinder.
|
\param radius Radius of the cylinder.
|
||||||
\param length Length of the cylinder.
|
\param length Length of the cylinder.
|
||||||
\param tesselation Number of quads around the circumference of the cylinder.
|
\param tessellation Number of quads around the circumference of the cylinder.
|
||||||
\param color The color of the cylinder.
|
\param color The color of the cylinder.
|
||||||
\param closeTop If true, close the ends of the cylinder, otherwise leave them open.
|
\param closeTop If true, close the ends of the cylinder, otherwise leave them open.
|
||||||
\param oblique X-offset (shear) of top compared to bottom.
|
\param oblique X-offset (shear) of top compared to bottom.
|
||||||
@ -183,7 +183,7 @@ public:
|
|||||||
\return Generated mesh.
|
\return Generated mesh.
|
||||||
*/
|
*/
|
||||||
virtual IMesh* createCylinderMesh(f32 radius, f32 length,
|
virtual IMesh* createCylinderMesh(f32 radius, f32 length,
|
||||||
u32 tesselation,
|
u32 tessellation,
|
||||||
const video::SColor& color=video::SColor(0xffffffff),
|
const video::SColor& color=video::SColor(0xffffffff),
|
||||||
bool closeTop=true, f32 oblique=0.f, u32 normalType=0) const =0;
|
bool closeTop=true, f32 oblique=0.f, u32 normalType=0) const =0;
|
||||||
|
|
||||||
@ -191,13 +191,13 @@ public:
|
|||||||
/**
|
/**
|
||||||
\param radius Radius of the cone.
|
\param radius Radius of the cone.
|
||||||
\param length Length of the cone.
|
\param length Length of the cone.
|
||||||
\param tesselation Number of quads around the circumference of the cone.
|
\param tessellation Number of quads around the circumference of the cone.
|
||||||
\param colorTop The color of the top of the cone.
|
\param colorTop The color of the top of the cone.
|
||||||
\param colorBottom The color of the bottom of the cone.
|
\param colorBottom The color of the bottom of the cone.
|
||||||
\param oblique (to be documented)
|
\param oblique (to be documented)
|
||||||
\return Generated mesh.
|
\return Generated mesh.
|
||||||
*/
|
*/
|
||||||
virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation,
|
virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tessellation,
|
||||||
const video::SColor& colorTop=video::SColor(0xffffffff),
|
const video::SColor& colorTop=video::SColor(0xffffffff),
|
||||||
const video::SColor& colorBottom=video::SColor(0xffffffff),
|
const video::SColor& colorBottom=video::SColor(0xffffffff),
|
||||||
f32 oblique=0.f) const =0;
|
f32 oblique=0.f) const =0;
|
||||||
|
@ -19,7 +19,7 @@ enum ELOG_LEVEL
|
|||||||
//! Used for printing information helpful in debugging
|
//! Used for printing information helpful in debugging
|
||||||
ELL_DEBUG,
|
ELL_DEBUG,
|
||||||
|
|
||||||
//! Useful information to print. For example hardware infos or something started/stopped.
|
//! Useful information to print. For example hardware info or something started/stopped.
|
||||||
ELL_INFORMATION,
|
ELL_INFORMATION,
|
||||||
|
|
||||||
//! Warnings that something isn't as expected and can cause oddities
|
//! Warnings that something isn't as expected and can cause oddities
|
||||||
|
@ -40,7 +40,7 @@ namespace quake3
|
|||||||
:defaultLightMapMaterial ( video::EMT_LIGHTMAP_M4 ),
|
:defaultLightMapMaterial ( video::EMT_LIGHTMAP_M4 ),
|
||||||
defaultModulate ( video::EMFN_MODULATE_4X ),
|
defaultModulate ( video::EMFN_MODULATE_4X ),
|
||||||
defaultFilter ( video::EMF_BILINEAR_FILTER ),
|
defaultFilter ( video::EMF_BILINEAR_FILTER ),
|
||||||
patchTesselation ( 8 ),
|
patchTessellation ( 8 ),
|
||||||
verbose ( 0 ),
|
verbose ( 0 ),
|
||||||
startTime ( 0 ), endTime ( 0 ),
|
startTime ( 0 ), endTime ( 0 ),
|
||||||
mergeShaderBuffer ( 1 ),
|
mergeShaderBuffer ( 1 ),
|
||||||
@ -61,7 +61,7 @@ namespace quake3
|
|||||||
video::E_MATERIAL_TYPE defaultLightMapMaterial;
|
video::E_MATERIAL_TYPE defaultLightMapMaterial;
|
||||||
video::E_MODULATE_FUNC defaultModulate;
|
video::E_MODULATE_FUNC defaultModulate;
|
||||||
video::E_MATERIAL_FLAG defaultFilter;
|
video::E_MATERIAL_FLAG defaultFilter;
|
||||||
s32 patchTesselation;
|
s32 patchTessellation;
|
||||||
s32 verbose;
|
s32 verbose;
|
||||||
u32 startTime;
|
u32 startTime;
|
||||||
u32 endTime;
|
u32 endTime;
|
||||||
|
@ -1015,8 +1015,8 @@ namespace scene
|
|||||||
/** \param name Name of the mesh
|
/** \param name Name of the mesh
|
||||||
\param vtxColorCylinder color of the cylinder
|
\param vtxColorCylinder color of the cylinder
|
||||||
\param vtxColorCone color of the cone
|
\param vtxColorCone color of the cone
|
||||||
\param tesselationCylinder Number of quads the cylinder side consists of
|
\param tessellationCylinder Number of quads the cylinder side consists of
|
||||||
\param tesselationCone Number of triangles the cone's roof consists of
|
\param tessellationCone Number of triangles the cone's roof consists of
|
||||||
\param height Total height of the arrow
|
\param height Total height of the arrow
|
||||||
\param cylinderHeight Total height of the cylinder, should be lesser than total height
|
\param cylinderHeight Total height of the cylinder, should be lesser than total height
|
||||||
\param widthCylinder Diameter of the cylinder
|
\param widthCylinder Diameter of the cylinder
|
||||||
@ -1026,7 +1026,7 @@ namespace scene
|
|||||||
virtual IAnimatedMesh* addArrowMesh(const io::path& name,
|
virtual IAnimatedMesh* addArrowMesh(const io::path& name,
|
||||||
video::SColor vtxColorCylinder=0xFFFFFFFF,
|
video::SColor vtxColorCylinder=0xFFFFFFFF,
|
||||||
video::SColor vtxColorCone=0xFFFFFFFF,
|
video::SColor vtxColorCone=0xFFFFFFFF,
|
||||||
u32 tesselationCylinder=4, u32 tesselationCone=8,
|
u32 tessellationCylinder=4, u32 tessellationCone=8,
|
||||||
f32 height=1.f, f32 cylinderHeight=0.6f,
|
f32 height=1.f, f32 cylinderHeight=0.6f,
|
||||||
f32 widthCylinder=0.05f, f32 widthCone=0.3f) = 0;
|
f32 widthCylinder=0.05f, f32 widthCone=0.3f) = 0;
|
||||||
|
|
||||||
@ -1142,7 +1142,7 @@ namespace scene
|
|||||||
|
|
||||||
//! Clear all nodes which are currently registered for rendering
|
//! Clear all nodes which are currently registered for rendering
|
||||||
/** Usually you don't have to care about this as drawAll will clear nodes
|
/** Usually you don't have to care about this as drawAll will clear nodes
|
||||||
after rendering them. But sometimes you might have to manully reset this.
|
after rendering them. But sometimes you might have to manually reset this.
|
||||||
For example when you deleted nodes between registering and rendering. */
|
For example when you deleted nodes between registering and rendering. */
|
||||||
virtual void clearAllRegisteredNodesForRendering() = 0;
|
virtual void clearAllRegisteredNodesForRendering() = 0;
|
||||||
|
|
||||||
|
@ -674,7 +674,7 @@ namespace scene
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//! Updates the absolute tranformation or position based on the relative and the parents transformation
|
//! Updates the absolute transformation or position based on the relative and the parents transformation
|
||||||
/** It's exact behavior can be controlled by setUpdateAbsolutePosBehavior.
|
/** It's exact behavior can be controlled by setUpdateAbsolutePosBehavior.
|
||||||
Note: This does not recursively update the parents absolute positions, so if you have a deeper
|
Note: This does not recursively update the parents absolute positions, so if you have a deeper
|
||||||
hierarchy you might want to update the parents first.*/
|
hierarchy you might want to update the parents first.*/
|
||||||
|
@ -40,7 +40,7 @@ public:
|
|||||||
u32 Minute;
|
u32 Minute;
|
||||||
// Second of the minute, due to extra seconds from 0 to 61
|
// Second of the minute, due to extra seconds from 0 to 61
|
||||||
u32 Second;
|
u32 Second;
|
||||||
// Year of the Gregorian calender
|
// Year of the Gregorian calendar
|
||||||
s32 Year;
|
s32 Year;
|
||||||
// Month of the year, from 1 to 12
|
// Month of the year, from 1 to 12
|
||||||
u32 Month;
|
u32 Month;
|
||||||
|
@ -1334,7 +1334,7 @@ namespace video
|
|||||||
E_MATERIAL_TYPE enum or a value which was returned by
|
E_MATERIAL_TYPE enum or a value which was returned by
|
||||||
addMaterialRenderer().
|
addMaterialRenderer().
|
||||||
\return String with the name of the renderer, or 0 if not
|
\return String with the name of the renderer, or 0 if not
|
||||||
exisiting */
|
existing */
|
||||||
virtual const c8* getMaterialRendererName(u32 idx) const =0;
|
virtual const c8* getMaterialRendererName(u32 idx) const =0;
|
||||||
|
|
||||||
//! Sets the name of a material renderer.
|
//! Sets the name of a material renderer.
|
||||||
|
@ -251,7 +251,7 @@ you will not be able to use anything provided by the GUI Environment, including
|
|||||||
#undef _IRR_COMPILE_WITH_GUI_
|
#undef _IRR_COMPILE_WITH_GUI_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//! Define _IRR_COMPILE_WITH_PARTICLES to compile the engine the withe build-in particle system
|
//! Define _IRR_COMPILE_WITH_PARTICLES to compile the engine the with the build-in particle system
|
||||||
/** You can disable this if you don't need particles or use an external particle system. */
|
/** You can disable this if you don't need particles or use an external particle system. */
|
||||||
#define _IRR_COMPILE_WITH_PARTICLES_
|
#define _IRR_COMPILE_WITH_PARTICLES_
|
||||||
#ifdef NO_IRR_COMPILE_WITH_PARTICLES_
|
#ifdef NO_IRR_COMPILE_WITH_PARTICLES_
|
||||||
|
@ -258,7 +258,7 @@ namespace video
|
|||||||
//! This is also the value which is set when SMaterial::setFlag(EMF_ZWRITE_ENABLE) is enabled.
|
//! This is also the value which is set when SMaterial::setFlag(EMF_ZWRITE_ENABLE) is enabled.
|
||||||
//! Usually zwriting is enabled non-transparent materials - as far as Irrlicht can recognize those.
|
//! Usually zwriting is enabled non-transparent materials - as far as Irrlicht can recognize those.
|
||||||
//! Basically Irrlicht tries to handle the zwriting for you and assumes transparent materials don't need it.
|
//! Basically Irrlicht tries to handle the zwriting for you and assumes transparent materials don't need it.
|
||||||
//! This is addionally affected by IVideoDriver::setAllowZWriteOnTransparent
|
//! This is additionally affected by IVideoDriver::setAllowZWriteOnTransparent
|
||||||
EZW_AUTO,
|
EZW_AUTO,
|
||||||
|
|
||||||
//! zwrite always enabled for this material
|
//! zwrite always enabled for this material
|
||||||
@ -299,7 +299,7 @@ namespace video
|
|||||||
IRRLICHT_API extern u32 MATERIAL_MAX_TEXTURES_USED;
|
IRRLICHT_API extern u32 MATERIAL_MAX_TEXTURES_USED;
|
||||||
|
|
||||||
//! Struct for holding parameters for a material renderer
|
//! Struct for holding parameters for a material renderer
|
||||||
// Note for implementors: Serialization is in CNullDriver
|
// Note for implementers: Serialization is in CNullDriver
|
||||||
class SMaterial
|
class SMaterial
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -66,7 +66,7 @@ class line2d
|
|||||||
vector2d<T> getVector() const { return vector2d<T>( end.X - start.X, end.Y - start.Y); }
|
vector2d<T> getVector() const { return vector2d<T>( end.X - start.X, end.Y - start.Y); }
|
||||||
|
|
||||||
/*! Check if this segment intersects another segment,
|
/*! Check if this segment intersects another segment,
|
||||||
or if segments are coincindent (colinear). */
|
or if segments are coincident (colinear). */
|
||||||
bool intersectAsSegments( const line2d<T>& other) const
|
bool intersectAsSegments( const line2d<T>& other) const
|
||||||
{
|
{
|
||||||
// Taken from:
|
// Taken from:
|
||||||
@ -83,7 +83,7 @@ class line2d
|
|||||||
if (o1 != o2 && o3 != o4)
|
if (o1 != o2 && o3 != o4)
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
// Special Cases to check if segments are coolinear
|
// Special Cases to check if segments are colinear
|
||||||
if (o1 == 0 && other.start.isBetweenPoints( start, end)) return true;
|
if (o1 == 0 && other.start.isBetweenPoints( start, end)) return true;
|
||||||
if (o2 == 0 && other.end.isBetweenPoints( start, end)) return true;
|
if (o2 == 0 && other.end.isBetweenPoints( start, end)) return true;
|
||||||
if (o3 == 0 && start.isBetweenPoints( other.start, other.end)) return true;
|
if (o3 == 0 && start.isBetweenPoints( other.start, other.end)) return true;
|
||||||
|
@ -141,7 +141,7 @@ public:
|
|||||||
bool nearlyParallel( const vector2d<T> & other, const T factor = relativeErrorFactor<T>()) const
|
bool nearlyParallel( const vector2d<T> & other, const T factor = relativeErrorFactor<T>()) const
|
||||||
{
|
{
|
||||||
// https://eagergames.wordpress.com/2017/04/01/fast-parallel-lines-and-vectors-test/
|
// https://eagergames.wordpress.com/2017/04/01/fast-parallel-lines-and-vectors-test/
|
||||||
// if a || b then a.x/a.y = b.x/b.y (similiar triangles)
|
// if a || b then a.x/a.y = b.x/b.y (similar triangles)
|
||||||
// if a || b then either both x are 0 or both y are 0.
|
// if a || b then either both x are 0 or both y are 0.
|
||||||
|
|
||||||
return equalsRelative( X*other.Y, other.X* Y, factor)
|
return equalsRelative( X*other.Y, other.X* Y, factor)
|
||||||
|
@ -549,8 +549,8 @@ IMesh* CGeometryCreator::createTerrainMesh(video::IImage* texture,
|
|||||||
a cylinder, a cone and a cross
|
a cylinder, a cone and a cross
|
||||||
point up on (0,1.f, 0.f )
|
point up on (0,1.f, 0.f )
|
||||||
*/
|
*/
|
||||||
IMesh* CGeometryCreator::createArrowMesh(const u32 tesselationCylinder,
|
IMesh* CGeometryCreator::createArrowMesh(const u32 tessellationCylinder,
|
||||||
const u32 tesselationCone,
|
const u32 tessellationCone,
|
||||||
const f32 height,
|
const f32 height,
|
||||||
const f32 cylinderHeight,
|
const f32 cylinderHeight,
|
||||||
const f32 width0,
|
const f32 width0,
|
||||||
@ -558,9 +558,9 @@ IMesh* CGeometryCreator::createArrowMesh(const u32 tesselationCylinder,
|
|||||||
const video::SColor vtxColor0,
|
const video::SColor vtxColor0,
|
||||||
const video::SColor vtxColor1) const
|
const video::SColor vtxColor1) const
|
||||||
{
|
{
|
||||||
SMesh* mesh = (SMesh*)createCylinderMesh(width0, cylinderHeight, tesselationCylinder, vtxColor0, false);
|
SMesh* mesh = (SMesh*)createCylinderMesh(width0, cylinderHeight, tessellationCylinder, vtxColor0, false);
|
||||||
|
|
||||||
IMesh* mesh2 = createConeMesh(width1, height-cylinderHeight, tesselationCone, vtxColor1, vtxColor0);
|
IMesh* mesh2 = createConeMesh(width1, height-cylinderHeight, tessellationCone, vtxColor1, vtxColor0);
|
||||||
for (u32 i=0; i<mesh2->getMeshBufferCount(); ++i)
|
for (u32 i=0; i<mesh2->getMeshBufferCount(); ++i)
|
||||||
{
|
{
|
||||||
IMeshBuffer* buffer = mesh2->getMeshBuffer(i);
|
IMeshBuffer* buffer = mesh2->getMeshBuffer(i);
|
||||||
@ -745,23 +745,23 @@ IMesh* CGeometryCreator::createSphereMesh(f32 radius, u32 polyCountX, u32 polyCo
|
|||||||
|
|
||||||
/* A cylinder with proper normals and texture coords */
|
/* A cylinder with proper normals and texture coords */
|
||||||
IMesh* CGeometryCreator::createCylinderMesh(f32 radius, f32 length,
|
IMesh* CGeometryCreator::createCylinderMesh(f32 radius, f32 length,
|
||||||
u32 tesselation, const video::SColor& color,
|
u32 tessellation, const video::SColor& color,
|
||||||
bool closeTop, f32 oblique, u32 normalType) const
|
bool closeTop, f32 oblique, u32 normalType) const
|
||||||
{
|
{
|
||||||
SMeshBuffer* buffer = new SMeshBuffer();
|
SMeshBuffer* buffer = new SMeshBuffer();
|
||||||
|
|
||||||
const f32 recTesselation = core::reciprocal((f32)tesselation);
|
const f32 recTessellation = core::reciprocal((f32)tessellation);
|
||||||
const f32 recTesselationHalf = recTesselation * 0.5f;
|
const f32 recTessellationHalf = recTessellation * 0.5f;
|
||||||
const f32 angleStep = (core::PI * 2.f ) * recTesselation;
|
const f32 angleStep = (core::PI * 2.f ) * recTessellation;
|
||||||
const f32 angleStepHalf = angleStep*0.5f;
|
const f32 angleStepHalf = angleStep*0.5f;
|
||||||
|
|
||||||
u32 i;
|
u32 i;
|
||||||
video::S3DVertex v;
|
video::S3DVertex v;
|
||||||
v.Color = color;
|
v.Color = color;
|
||||||
buffer->Vertices.reallocate(tesselation*4+4+(closeTop?2:1));
|
buffer->Vertices.reallocate(tessellation*4+4+(closeTop?2:1));
|
||||||
buffer->Indices.reallocate((tesselation*2+1)*(closeTop?12:9));
|
buffer->Indices.reallocate((tessellation*2+1)*(closeTop?12:9));
|
||||||
f32 tcx = 0.f;
|
f32 tcx = 0.f;
|
||||||
for ( i = 0; i <= tesselation; ++i )
|
for ( i = 0; i <= tessellation; ++i )
|
||||||
{
|
{
|
||||||
const f32 angle = angleStep * i;
|
const f32 angle = angleStep * i;
|
||||||
v.Pos.X = radius * cosf(angle);
|
v.Pos.X = radius * cosf(angle);
|
||||||
@ -797,7 +797,7 @@ IMesh* CGeometryCreator::createCylinderMesh(f32 radius, f32 length,
|
|||||||
case 1: v.Normal = v.Pos; break;
|
case 1: v.Normal = v.Pos; break;
|
||||||
}
|
}
|
||||||
v.Normal.normalize();
|
v.Normal.normalize();
|
||||||
v.TCoords.X=tcx+recTesselationHalf;
|
v.TCoords.X=tcx+recTessellationHalf;
|
||||||
v.TCoords.Y=0.f;
|
v.TCoords.Y=0.f;
|
||||||
buffer->Vertices.push_back(v);
|
buffer->Vertices.push_back(v);
|
||||||
|
|
||||||
@ -811,11 +811,11 @@ IMesh* CGeometryCreator::createCylinderMesh(f32 radius, f32 length,
|
|||||||
v.Normal.normalize();
|
v.Normal.normalize();
|
||||||
v.TCoords.Y=1.f;
|
v.TCoords.Y=1.f;
|
||||||
buffer->Vertices.push_back(v);
|
buffer->Vertices.push_back(v);
|
||||||
tcx += recTesselation;
|
tcx += recTessellation;
|
||||||
}
|
}
|
||||||
|
|
||||||
// indices for the main hull part
|
// indices for the main hull part
|
||||||
const u32 nonWrappedSize = tesselation* 4;
|
const u32 nonWrappedSize = tessellation* 4;
|
||||||
for (i=0; i != nonWrappedSize; i += 2)
|
for (i=0; i != nonWrappedSize; i += 2)
|
||||||
{
|
{
|
||||||
buffer->Indices.push_back(i + 2);
|
buffer->Indices.push_back(i + 2);
|
||||||
@ -898,21 +898,21 @@ IMesh* CGeometryCreator::createCylinderMesh(f32 radius, f32 length,
|
|||||||
|
|
||||||
|
|
||||||
/* A cone with proper normals and texture coords */
|
/* A cone with proper normals and texture coords */
|
||||||
IMesh* CGeometryCreator::createConeMesh(f32 radius, f32 length, u32 tesselation,
|
IMesh* CGeometryCreator::createConeMesh(f32 radius, f32 length, u32 tessellation,
|
||||||
const video::SColor& colorTop,
|
const video::SColor& colorTop,
|
||||||
const video::SColor& colorBottom,
|
const video::SColor& colorBottom,
|
||||||
f32 oblique) const
|
f32 oblique) const
|
||||||
{
|
{
|
||||||
SMeshBuffer* buffer = new SMeshBuffer();
|
SMeshBuffer* buffer = new SMeshBuffer();
|
||||||
|
|
||||||
const f32 angleStep = (core::PI * 2.f ) / tesselation;
|
const f32 angleStep = (core::PI * 2.f ) / tessellation;
|
||||||
const f32 angleStepHalf = angleStep*0.5f;
|
const f32 angleStepHalf = angleStep*0.5f;
|
||||||
|
|
||||||
video::S3DVertex v;
|
video::S3DVertex v;
|
||||||
u32 i;
|
u32 i;
|
||||||
|
|
||||||
v.Color = colorTop;
|
v.Color = colorTop;
|
||||||
for ( i = 0; i != tesselation; ++i )
|
for ( i = 0; i != tessellation; ++i )
|
||||||
{
|
{
|
||||||
f32 angle = angleStep * f32(i);
|
f32 angle = angleStep * f32(i);
|
||||||
|
|
||||||
|
@ -34,19 +34,19 @@ public:
|
|||||||
const core::dimension2d<u32>& defaultVertexBlockSize,
|
const core::dimension2d<u32>& defaultVertexBlockSize,
|
||||||
bool debugBorders=false) const IRR_OVERRIDE;
|
bool debugBorders=false) const IRR_OVERRIDE;
|
||||||
|
|
||||||
virtual IMesh* createArrowMesh(const u32 tesselationCylinder,
|
virtual IMesh* createArrowMesh(const u32 tessellationCylinder,
|
||||||
const u32 tesselationCone, const f32 height,
|
const u32 tessellationCone, const f32 height,
|
||||||
const f32 cylinderHeight, const f32 width0,
|
const f32 cylinderHeight, const f32 width0,
|
||||||
const f32 width1, const video::SColor vtxColor0,
|
const f32 width1, const video::SColor vtxColor0,
|
||||||
const video::SColor vtxColor1) const IRR_OVERRIDE;
|
const video::SColor vtxColor1) const IRR_OVERRIDE;
|
||||||
|
|
||||||
virtual IMesh* createSphereMesh(f32 radius, u32 polyCountX, u32 polyCountY) const IRR_OVERRIDE;
|
virtual IMesh* createSphereMesh(f32 radius, u32 polyCountX, u32 polyCountY) const IRR_OVERRIDE;
|
||||||
|
|
||||||
virtual IMesh* createCylinderMesh(f32 radius, f32 length, u32 tesselation,
|
virtual IMesh* createCylinderMesh(f32 radius, f32 length, u32 tessellation,
|
||||||
const video::SColor& color=0xffffffff,
|
const video::SColor& color=0xffffffff,
|
||||||
bool closeTop=true, f32 oblique=0.f, u32 normalType=0) const IRR_OVERRIDE;
|
bool closeTop=true, f32 oblique=0.f, u32 normalType=0) const IRR_OVERRIDE;
|
||||||
|
|
||||||
virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tesselation,
|
virtual IMesh* createConeMesh(f32 radius, f32 length, u32 tessellation,
|
||||||
const video::SColor& colorTop=0xffffffff,
|
const video::SColor& colorTop=0xffffffff,
|
||||||
const video::SColor& colorBottom=0xffffffff,
|
const video::SColor& colorBottom=0xffffffff,
|
||||||
f32 oblique=0.f) const IRR_OVERRIDE;
|
f32 oblique=0.f) const IRR_OVERRIDE;
|
||||||
|
@ -971,7 +971,7 @@ scene::SMesh** CQ3LevelMesh::buildMesh(s32 num)
|
|||||||
break;
|
break;
|
||||||
case 2: // patches
|
case 2: // patches
|
||||||
createCurvedSurface_bezier( buffer, i,
|
createCurvedSurface_bezier( buffer, i,
|
||||||
LoadParam.patchTesselation,
|
LoadParam.patchTessellation,
|
||||||
item[g].takeVertexColor
|
item[g].takeVertexColor
|
||||||
);
|
);
|
||||||
break;
|
break;
|
||||||
@ -1274,7 +1274,7 @@ void CQ3LevelMesh::SBezier::tesselate( s32 level )
|
|||||||
*/
|
*/
|
||||||
void CQ3LevelMesh::createCurvedSurface_nosubdivision(SMeshBufferLightMap* meshBuffer,
|
void CQ3LevelMesh::createCurvedSurface_nosubdivision(SMeshBufferLightMap* meshBuffer,
|
||||||
s32 faceIndex,
|
s32 faceIndex,
|
||||||
s32 patchTesselation,
|
s32 patchTessellation,
|
||||||
s32 storevertexcolor)
|
s32 storevertexcolor)
|
||||||
{
|
{
|
||||||
tBSPFace * face = &Faces[faceIndex];
|
tBSPFace * face = &Faces[faceIndex];
|
||||||
@ -1318,7 +1318,7 @@ void CQ3LevelMesh::createCurvedSurface_nosubdivision(SMeshBufferLightMap* meshBu
|
|||||||
*/
|
*/
|
||||||
void CQ3LevelMesh::createCurvedSurface_bezier(SMeshBufferLightMap* meshBuffer,
|
void CQ3LevelMesh::createCurvedSurface_bezier(SMeshBufferLightMap* meshBuffer,
|
||||||
s32 faceIndex,
|
s32 faceIndex,
|
||||||
s32 patchTesselation,
|
s32 patchTessellation,
|
||||||
s32 storevertexcolor)
|
s32 storevertexcolor)
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -1372,7 +1372,7 @@ void CQ3LevelMesh::createCurvedSurface_bezier(SMeshBufferLightMap* meshBuffer,
|
|||||||
Bezier.control[7] = controlPoint[ inx + controlWidth * 2 + 1];
|
Bezier.control[7] = controlPoint[ inx + controlWidth * 2 + 1];
|
||||||
Bezier.control[8] = controlPoint[ inx + controlWidth * 2 + 2];
|
Bezier.control[8] = controlPoint[ inx + controlWidth * 2 + 2];
|
||||||
|
|
||||||
Bezier.tesselate( patchTesselation );
|
Bezier.tesselate( patchTessellation );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,10 +324,10 @@ namespace scene
|
|||||||
|
|
||||||
//bi-quadratic bezier patches
|
//bi-quadratic bezier patches
|
||||||
void createCurvedSurface_bezier(SMeshBufferLightMap* meshBuffer,
|
void createCurvedSurface_bezier(SMeshBufferLightMap* meshBuffer,
|
||||||
s32 faceIndex, s32 patchTesselation, s32 storevertexcolor);
|
s32 faceIndex, s32 patchTessellation, s32 storevertexcolor);
|
||||||
|
|
||||||
void createCurvedSurface_nosubdivision(SMeshBufferLightMap* meshBuffer,
|
void createCurvedSurface_nosubdivision(SMeshBufferLightMap* meshBuffer,
|
||||||
s32 faceIndex, s32 patchTesselation, s32 storevertexcolor);
|
s32 faceIndex, s32 patchTessellation, s32 storevertexcolor);
|
||||||
|
|
||||||
struct S3DVertex2TCoords_64
|
struct S3DVertex2TCoords_64
|
||||||
{
|
{
|
||||||
|
@ -1095,14 +1095,14 @@ IAnimatedMesh* CSceneManager::addTerrainMesh(const io::path& name,
|
|||||||
//! Adds an arrow mesh to the mesh pool.
|
//! Adds an arrow mesh to the mesh pool.
|
||||||
IAnimatedMesh* CSceneManager::addArrowMesh(const io::path& name,
|
IAnimatedMesh* CSceneManager::addArrowMesh(const io::path& name,
|
||||||
video::SColor vtxColor0, video::SColor vtxColor1,
|
video::SColor vtxColor0, video::SColor vtxColor1,
|
||||||
u32 tesselationCylinder, u32 tesselationCone, f32 height,
|
u32 tessellationCylinder, u32 tessellationCone, f32 height,
|
||||||
f32 cylinderHeight, f32 width0,f32 width1)
|
f32 cylinderHeight, f32 width0,f32 width1)
|
||||||
{
|
{
|
||||||
if (MeshCache->isMeshLoaded(name))
|
if (MeshCache->isMeshLoaded(name))
|
||||||
return MeshCache->getMeshByName(name);
|
return MeshCache->getMeshByName(name);
|
||||||
|
|
||||||
IMesh* mesh = GeometryCreator->createArrowMesh( tesselationCylinder,
|
IMesh* mesh = GeometryCreator->createArrowMesh( tessellationCylinder,
|
||||||
tesselationCone, height, cylinderHeight, width0,width1,
|
tessellationCone, height, cylinderHeight, width0,width1,
|
||||||
vtxColor0, vtxColor1);
|
vtxColor0, vtxColor1);
|
||||||
if (!mesh)
|
if (!mesh)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -229,7 +229,7 @@ namespace scene
|
|||||||
//! Add a arrow mesh to the mesh pool
|
//! Add a arrow mesh to the mesh pool
|
||||||
virtual IAnimatedMesh* addArrowMesh(const io::path& name,
|
virtual IAnimatedMesh* addArrowMesh(const io::path& name,
|
||||||
video::SColor vtxColor0, video::SColor vtxColor1,
|
video::SColor vtxColor0, video::SColor vtxColor1,
|
||||||
u32 tesselationCylinder, u32 tesselationCone,
|
u32 tessellationCylinder, u32 tessellationCone,
|
||||||
f32 height, f32 cylinderHeight, f32 width0,
|
f32 height, f32 cylinderHeight, f32 width0,
|
||||||
f32 width1) IRR_OVERRIDE;
|
f32 width1) IRR_OVERRIDE;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user