Search found 3947 matches
- Mon Apr 26, 2010 3:34 pm
- Forum: Beginners Help
- Topic: Itimer confusion!
- Replies: 3
- Views: 429
The ITimer interface doesn't provide the time of day. If you want that, use the C functions time() and localtime() or strftime() . If you want to know how long the program has been running, you could use ITimer . You need to get a snapshot of the initial value of the timer, and the current value. Th...
- Thu Apr 22, 2010 3:34 pm
- Forum: Beginners Help
- Topic: (Un)packing values via bit shifting
- Replies: 3
- Views: 397
Why not just do something like this... struct packed_info { uint16_t facing : 1 uint16_t y_coord : 4; uint16_t x_coord : 4; }; And let the compiler worry about the bit packing for you? If you really want to do the masking and shifting yourself, the model is simple. Figure out what the bitmask and sh...
- Tue Apr 20, 2010 6:15 pm
- Forum: Beginners Help
- Topic: Position relative to camera position [SOLVED]
- Replies: 8
- Views: 724
The problem lies here... rot = Camera->getRotation(); shift = rot.normalize(); The camera rotation is not a vector in the normal sense. It is a series of three values, the rotations around the X, Y and Z axes. Are the projectile-beam turrets supposed to be attached to the camera 'pod', or is the cam...
- Mon Apr 19, 2010 4:07 am
- Forum: Beginners Help
- Topic: [solved] A quad not rendered correctly
- Replies: 9
- Views: 844
- Sat Apr 17, 2010 9:44 pm
- Forum: Beginners Help
- Topic: [solved] A quad not rendered correctly
- Replies: 9
- Views: 844
- Sat Apr 17, 2010 9:42 pm
- Forum: Beginners Help
- Topic: Generating terrain from a plain c++ array
- Replies: 41
- Views: 3157
- Fri Apr 16, 2010 6:22 pm
- Forum: Bug reports
- Topic: Boundingbox of ILightSceneNode worries
- Replies: 4
- Views: 641
- Fri Apr 16, 2010 6:16 pm
- Forum: Beginners Help
- Topic: get rotation of a triangle
- Replies: 1
- Views: 234
Get the orthornormal basis for your triangle (the up, left and forward vectors) in the coordinate system of the cube's parent, and then rotate the cube into alignment. You could probably do this by using getting the world rotations of the triangle and cube as quaternions, and then finding the differ...
- Fri Apr 16, 2010 4:43 am
- Forum: Advanced Help
- Topic: ROUNDING_ERROR_f32 too big? (f64 too?)
- Replies: 9
- Views: 2192
If there is a function macro named min() you can prevent the preprocessor from expanding it by using an additional set of parens.
Travis
Code: Select all
f32 d = ...;
if( d < std::numeric_limits<T>::(min)())
- Fri Apr 16, 2010 4:31 am
- Forum: Bug reports
- Topic: Boundingbox of ILightSceneNode worries
- Replies: 4
- Views: 641
I've noticed this before, but been to lazy to mention it. To get a minimum bounding box for a sphere with a radius r , it should be BBox.MaxEdge.set( r, r, r ); BBox.MinEdge.set( -r, -r, -r ); So at least part of the code is right... The whole (r*r)/2.f thing is garbage. It should be LightData.Radiu...
- Fri Apr 16, 2010 4:15 am
- Forum: Beginners Help
- Topic: drawVertexPrimitiveList
- Replies: 1
- Views: 1294
It looks like you are not using drawVertexPrimitiveList() correctly. The first and third parameters are pointers to vertex data and index data respectively. You are passing pointers to the vertex buffer and index buffer instead. Another thing that you can do to improve the safety of your code is to ...
- Sun Apr 04, 2010 6:09 pm
- Forum: Beginners Help
- Topic: Newbie std::string problem, printing wrong info:S
- Replies: 9
- Views: 1527
- Wed Mar 31, 2010 9:00 pm
- Forum: Open Discussion and Dev Announcements
- Topic: Virtual functions and creator functions in scene manager
- Replies: 6
- Views: 1602
Most everything in Irrlicht is hidden behind an interface. This allows the implementation to vary without affecting the interface (i.e., a reference or pointer to ITexture can refer to a COpenGLTexture ). This is necessary in some places to support different rendering libraries (opengl, d3d, softwar...
- Mon Mar 29, 2010 4:53 pm
- Forum: Beginners Help
- Topic: Tricky problem with textures... any ideas welcome!
- Replies: 10
- Views: 1323
- Mon Mar 29, 2010 4:51 pm
- Forum: Beginners Help
- Topic: rotate a particle emitter
- Replies: 5
- Views: 587
It seems you could implement a scene node similar to a dummy scene node that would ignore the rotation of its parent. You could do this by inheriting from ISceneNode and overriding updateAbsolutePosition() to ignore the rotation of the parent scene node (if any). Then you just need to attach one of ...