Jump to content
  • Advertisement
Sign in to follow this  
jon723

Putting one geometry in the frame of another

This topic is 4971 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello everyone, im trying to tackle a problem in which I have to define specific regions of a geometry based on another geometry. Let's say for example, I have a double sided wrench (you should all know what one of these looks like), based on another geometry which acts a reference (to show what region is the handle or where the head is) how do I put the reference geometry in to frame of the other geometry ???

Share this post


Link to post
Share on other sites
Advertisement
I'm not sure that i understand what you are asking but have a look at the stencil buffer, it may be able to do what you want to do.

Are you saying you want to mask out where to draw with 3d geometry, not rendered there means dont render the second mesh here either?

Share this post


Link to post
Share on other sites
I'm not exactly sure what you're asking, but I'll give you a quick 'basic' answer. If you already know this stuff, nevermind, but otherwise...

It sounds like you want a hierarchical system of objects, each with its own local coordinate system. 'Child' object are defined in their parent's coordinate system.

The classic example is a car with four wheels. The car body is the parent (the top node in the tree), and has a local coordinate system that is defined in respect to the world coordinate system. Each wheel is a child, and has a local coordinate system which is defined in respect to the body's coordinate system.

A coordinate system can be represented in a few different ways - common representations are 3x4 or 4x3 matrix, 3x3 matrix and vector, or quaternion and vector.

If I totally missed the mark, maybe you can rephrase the question or let us know more specifically what you need.

Share this post


Link to post
Share on other sites
jyk -- I think you're on the right track let me try to draw out in 2d (even though this is for a 3d app) what I'm getting at:

Lets say this is the geometry of a bolt, where we have the shaft and the head

|-----------|-----| <------- The head
|-----------|____| <-------


And we have this reference geometry which would indicate where the head and the shaft are


------(--)---(--)
------(--)---(--)

The head of the bolt is between these two rings

I want to be able to identify on the bolt geometry the areas of the bolt based on th reference geometry. Does this make sense???


Im sorry that my ascii art sucks

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!