Attach Object...
How can i attach two objects together...i want to attach a door and windows with the door...
how should i do it?
Is tis Open GL or NeHe specific?
You can create a pointer in Door that you will assign teh window address. Now the door has access (thus connected?) to the window. Vice-versa if necessary.
You can create a pointer in Door that you will assign teh window address. Now the door has access (thus connected?) to the window. Vice-versa if necessary.
is OpenGL...
any example code?? im new in OpenGL...i want to attach a door and windows to the wall (sorry...not door)
any example code?? im new in OpenGL...i want to attach a door and windows to the wall (sorry...not door)
Opengl doesn''t see objects, it sees polygons. If you want a door and window and wall, you need to draw and door and window and wall using polygons.
Well, first of all, translate to the point on which the doors/windows are connected to the walls,
then rotate (as that's probably what you want), then translate to the point the origin of the door/window should be and draw the door/window.
Am i clear?
[edited by - Tree Penguin on March 5, 2004 10:37:32 AM]
then rotate (as that's probably what you want), then translate to the point the origin of the door/window should be and draw the door/window.
Am i clear?
[edited by - Tree Penguin on March 5, 2004 10:37:32 AM]
i know...i got a house, now just want to know how to attach a door and windows to the wall only...(i drawed door and windows as well)
Thanks~
Thanks~
sorry, i dun understand...what you suggestion is good but can i have some sample of code to refer??
Thanks alot =)
Thanks alot =)
red=door/window origin, green=the point where the door/window is connected to the wall.
1. draw the wall
this is per moving object:
2. translate (move) to the connection point
3. rotate a certain amount (so the door/window is open, not closed)
4. translate the amount (door/window origin - connection point)
5. draw the door/window
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement