LAST UPDATE 04.03.2013
----------------------------------------
diff to svn-trunk 4461:
http://benjaminhampe.be.ohost.de/Irrlic ... r2013.diff
http://benjaminhampe.be.ohost.de/Irrlic ... tlogo4.png
this texture is used with the example.cpp because the trasition from blue to grey is in the middle, to have better visual results
also the text within the texture helped me finding the right uv-coords for all shapes.
-------------------------------------------
i added many new mesh creator functions to the IGeometryCreator Interface
full resolution image http://benjaminhampe.be.ohost.de/Irrlic ... reator.png
preview
#1 triangle
#2 rect
#3 roundrect
#4 pioneer-hexagon
#5 circle ( todo: radial segmentation if needed )
#6 ellipse
#7 ring
#8 arc
#9 upperspherehalf
#10 lowerspherehalf
#11 capsule
#12 cylinder ( todo: radial segmentation if needed )
#13 tube ( todo: radial segmentation if needed, inner hull has no vertical segmentation either )
#14 ellipsoid
#15 torus
#16 box ( like inverted skybox with 1 or 3 or 6 individual textures for dices, creates, etc..)
more im working on:
#17 tetraeder
#18 icosaeder ( if allowed to use from ikam )
#19 path2d out of rects (thickness is height of rect) with linejoin (miter,bevel, round)
#20 path3d out of boxes or cylinderhulls (thickness is height of box) with linejoin
with freetype outline renderer
#21 polygonal text (2d)
#22 polygonal extruded text (3d)
http://benjaminhampe.be.ohost.de/Irrlic ... yCreator.h
http://benjaminhampe.be.ohost.de/Irrlic ... yCreator.h
http://benjaminhampe.be.ohost.de/Irrlic ... reator.cpp
i use two new template classes in irrMath.h
CSinTable<T>( elementCount, T startAngle, T endAngle)
CCosTable<T>( elementCount, T startAngle, T endAngle)
http://benjaminhampe.be.ohost.de/Irrlic ... /irrMath.h
( the classes are at the very end of irrMath.h )
i wrote a fully example to test new stuff:
Irrlicht Example 27.GeometryCreator
http://benjaminhampe.be.ohost.de/Irrlic ... reator.cbp
http://benjaminhampe.be.ohost.de/Irrlic ... r/main.cpp
http://benjaminhampe.be.ohost.de/Irrlic ... rToImage.h
http://benjaminhampe.be.ohost.de/Irrlic ... oImage.cpp
http://benjaminhampe.be.ohost.de/Irrlic ... tlogo6.png --> needs to be added to media folder
have fun
----------------------------------------
original
----------------------------------------
hi,
i open this thread to collect new SceneNodes for the irrlicht-community.
all SceneNodes will have some additional rendering styles set with setPrimitiveType()
e.g. Circle with just an outline through EPT_LINE_LOOP
and filled with EPT_POLYGON or EPT_TRIANGLES
or EPT_QUADS instead EPT_TRIANGLES
#1 Capsule (requested by another thread)
http://benjaminhampe.be.ohost.de/Irrlic ... ceneNode.h
http://benjaminhampe.be.ohost.de/Irrlic ... neNode.cpp
for use with IMeshSceneNode:
http://benjaminhampe.be.ohost.de/Irrlic ... suleMesh.h
http://benjaminhampe.be.ohost.de/Irrlic ... leMesh.cpp
#2 Teapot
http://benjaminhampe.be.ohost.de/Irrlic ... ceneNode.h
http://benjaminhampe.be.ohost.de/Irrlic ... neNode.cpp
#3 Tube
http://benjaminhampe.be.ohost.de/Irrlic ... TubeMesh.h
http://benjaminhampe.be.ohost.de/Irrlic ... beMesh.cpp
#4 CNormalSceneNode
http://benjaminhampe.be.ohost.de/Irrlic ... ceneNode.h
http://benjaminhampe.be.ohost.de/Irrlic ... neNode.cpp
#5 RoundRect:
Rx & Ry did work out of the box -> so elliptic rounded rect is also possible with this function
http://benjaminhampe.be.ohost.de/Irrlic ... RectMesh.h
http://benjaminhampe.be.ohost.de/Irrlic ... ctMesh.cpp
http://benjaminhampe.be.ohost.de/Irrlic ... ndRect.pdf
#6 createRainbowTexture + createArcMesh:
# Arc
createRainbowTexture uses algorithm from Bruton, with gamma, also saves transparency value 0..255
createArcMesh can have any value between 0 360 degrees, starting 0 is +X,Y=0,Z=0, going ccw
-> arc has MaterialType EMT_TRANSPARENT_ALPHA_CHANNEL
http://benjaminhampe.be.ohost.de/Irrlic ... nbowMesh.h
http://benjaminhampe.be.ohost.de/Irrlic ... owMesh.cpp
Example Code:
Code: Select all
scene::IMeshSceneNode* node = 0;
for (u32 z=0; z<7; ++z)
{
node = app->getSceneManager()->addMeshSceneNode(
scene::createArcMesh(100.0f+100.0f*z, 70.0f+50.0f*(f32)z, 0.0f-(f32)(z*10), 180.0f+(f32)(z*10), 13+4*z),
app->getRootSceneNode(),
-1,
core::vector3df(400,0,100.0f+200.0f*z));
dbSetObjectWireframe(node, false);
dbTextureObject(node, 0, video::createRainbowTexture(app->getVideoDriver(), 64,64,200-z*20,1.0));
}
# Plane
# Circle
# Ring
# Ellipse
# Torus
# StanfordBunny
# Tetraeder