Search found 3947 matches

by vitek
Sat Jun 18, 2011 11:10 pm
Forum: Beginners Help
Topic: property system for editor
Replies: 2
Views: 371

It shouldn't be too hard. If you deserialize the attributes into an io::IAttributes, you can get/set each attribute individually, and then you can serialize the attributes back to the object.

Travis
by vitek
Fri Apr 08, 2011 1:58 am
Forum: Beginners Help
Topic: View frustrum question.
Replies: 5
Views: 448

You should take a look at this thread. If what I describe is correct, the planes of the view frustum were backward at one time, and that would make my old code misbehave with current versions of Irrlicht (assuming the bug has been fixed). I provide an example testing the node visibility in that thre...
by vitek
Thu Apr 07, 2011 12:46 am
Forum: Beginners Help
Topic: this seem like good way to interpolate rotation matrices?
Replies: 3
Views: 445

You should be able to write mat_keyframe1.interpolate(mat_keyframe2, percent0to1); to interpolate between two matrices.

Travis
by vitek
Sat Jan 15, 2011 3:13 am
Forum: Advanced Help
Topic: Can we create a copy of the metaselector?
Replies: 5
Views: 629

There is no way to copy the meta selector. Without modifying Irrlicht, the only solution is to create and populate all of the meta selectors individually. Of course, the changes to Irrlicht wouldn't be that significant. You just need to add a clone() abstract method to the base class, and then imple...
by vitek
Sat Nov 27, 2010 11:02 pm
Forum: Beginners Help
Topic: Select multiple units with some sort of 2D box
Replies: 3
Views: 376

If you have a 3d scene, you actually need to convert that 2d box on screen into a pyramid (view frustum). The top of the frustum is the camera position, and the corners are the points on the box. Then you just search through the scene looking for nodes that are inside the view frustum. This has been...
by vitek
Sun Nov 21, 2010 1:53 am
Forum: Beginners Help
Topic: Rounded edges?
Replies: 4
Views: 540

You need to use the draw2D*() methods of the IVideoDriver interface to do it. Remember that a curve is a series of lines.

Travis
by vitek
Sun Nov 21, 2010 1:49 am
Forum: Beginners Help
Topic: Display custom bounding boxes
Replies: 3
Views: 354

The code I posted in this thread shows three different ways to draw a node bounding box.

Travis
by vitek
Sun Nov 21, 2010 1:35 am
Forum: Beginners Help
Topic: my culling function
Replies: 10
Views: 1279

arnir wrote:

Code: Select all

    vector3df *edges = new vector3df[8];

    // snip...
    
    delete [] edges;
IMO, you should allocate the edges array on the stack for efficiency and safety. Something like this...

Code: Select all

vector3df edges[8];
Travis
by vitek
Sun Oct 24, 2010 3:44 pm
Forum: Beginners Help
Topic: Hashes ...
Replies: 14
Views: 943

Yes, hashing is not a lossless compression algorithm. I can agree to that.

Travis
by vitek
Sat Oct 23, 2010 5:53 pm
Forum: Beginners Help
Topic: Hashes ...
Replies: 14
Views: 943

OK, looks like you need to learn something about hashes: you NEVER can get your original value back. If you have a perfect hash and a map from hash to value, it seems that you could do it quite easily. If the hash is actually a unique identifier for an object, you could also do it trivially. Travis
by vitek
Mon Oct 18, 2010 2:42 am
Forum: Beginners Help
Topic: irr::core::list<typename T> - who the f*** did program
Replies: 5
Views: 502

I just don't get it. And since you don't understand it, it must be wrong... I am trying to find a list node by its value, but there's no function. So write one? Or use an existing algorithm from the C++ Standard Library. template<class Iterator, class Predicate> Iterator my_find_if(Iterator beg, It...
by vitek
Mon Oct 04, 2010 3:15 am
Forum: Beginners Help
Topic: Bounding Box
Replies: 2
Views: 361

If you want an object space bounding box, you want ISceneNode::getBoundingBox() . If you use ISceneNode::getTransformedBoundingBox() you'll get a box that is aligned to the world space coordinate system which makes it larger than necessary when the object is rotated. If you want to render the object...
by vitek
Mon Sep 20, 2010 3:59 am
Forum: Beginners Help
Topic: Half extents of a cube scene node or AABB
Replies: 2
Views: 750

Re: Half extents of a cube scene node or AABB

How can I get the half extents, and convex size of an Irrlicht cube scene node? Why can't you use the scene node's object space bounding box? That box should completely and exactly enclose the box. If you want the half extents, you get the extents and divide by two. I have no idea what you mean by ...
by vitek
Sun Sep 19, 2010 12:14 am
Forum: Beginners Help
Topic: Draw a line between two points
Replies: 2
Views: 588

Don't forget to set the material and world transform before drawing the line.

Travis