## Maya Training

Introduction to Hard Surface Modeling

## Maya Training

Interiors and Furniture Vol 1 & 2 - Modeling & Cloth

## Maya Training

Shading, Lighting and Rendering the Bedroom in MR

## Maya Training

Robot volume one - Modeling with animation in mind

## Maya Training

Spach-Alspaugh House the complete courseware

## Maya Training

Burt The Cartoon Dinosaur Vol 01 - Modeling

## New Maya Training

Robot Volume 02 - Hybrid Rigging
You are here > Home > SimplyMaya Community Forums

# Welcome to Simply Maya

 Simply Maya User Community - Maya Tutorials Extrusion of edges algorithm in c++
 Register FAQ Members List Calendar Mark Forums Read

 30-01-2006, 02:06 AM #1 MattTheMan Registered User     Join Date: Apr 2005 Location: Fairfield, CT Posts: 2,436 Thanks: 0 Thanked 18 Times in 18 Posts Extrusion of edges algorithm in c++ Alright, people, another issue here. To make a modeling system using poly by poly technique, first, I create a plane: 2 vectors with a projection between them. and then I have this issue: Two sides are vectors, but the other two are not. Is there any way I can convert those 2 sides to vectors so I can manipulate them? heres a little diagram I drew in Paint (i didnt feel like starting up photoshop) to help you understand my problem. Attached Thumbnails   __________________ Live the life you love, love the life you live
 30-01-2006, 02:52 AM #2 Joopson Registered User     Join Date: Jul 2005 Location: Los Angeles, CA Posts: 2,313 Thanks: 1 Thanked 33 Times in 33 Posts umm,,,... soryy, i d k, im lost __________________ Environment Artist @ Plastic Piranha www.joopson.com
 05-02-2006, 06:21 PM #3 MattTheMan Registered User     Join Date: Apr 2005 Location: Fairfield, CT Posts: 2,436 Thanks: 0 Thanked 18 Times in 18 Posts Ok, I figured it out. This is sooo obvious now. Instead of just having 2 vectors per quad, now I have 5. It has 2 vectors sharing each vertex, so I can extrude on all sides, plus I can manipulate each vertice, and it will affect the opposite end as well, (when I tried this on my old program, it crashed) because it is triangulated. Though, I don't have to display the triangulating edge, the computer knows its still there. Attached Thumbnails   __________________ Live the life you love, love the life you live
 06-02-2006, 02:38 AM #4 MattTheMan Registered User     Join Date: Apr 2005 Location: Fairfield, CT Posts: 2,436 Thanks: 0 Thanked 18 Times in 18 Posts You know, I took a better look at that code, and found that using vectors as edges is a very bad thing to do. Vectors being lines in 3d space starting at point O and going on in a constant direction forever, unless affected by some other object. My method included using only parts of vectors as edges, and that took a bunch of code. Simply using vertices (3 floating point numbers: x, y, and z) like this: class vertex{ Public: float x, y, z; }; and triangular faces like this: class tri{ Public: float vertex(x, y, z), vertex(x, y, z), vertex(x, y, z); }; and finally, the entire polygon like this: class poly{ Public: float tri(vertex(x, y, z)), vertex(x, y, z)), vertex(x, y, z)), tri(vertex(x, y, z)) }; allows me to edit polygons really easily. by the way, that last one is a plane and then I can have an array of polygons making up the entire scene. This also makes it easier for me to do some collision testing, like for split faces tool and stuff. ALso makes booleans a breeze. In the end, this will help me make a .obj or .3ds exporter for my raytracer. cya later, Matt __________________ Live the life you love, love the life you live
 06-02-2006, 06:31 PM #5 gster123 Moderator     Join Date: May 2005 Location: Manchester Uk Posts: 6,300 Thanks: 1 Thanked 51 Times in 45 Posts Your doin well on the old programming mate!! What you using to do it with?? I did 2 years of C++ programming then gave it up, couldent get my head round it, thinbk I'm gonna have to get back into it tho!!
 06-02-2006, 09:54 PM #6 MattTheMan Registered User     Join Date: Apr 2005 Location: Fairfield, CT Posts: 2,436 Thanks: 0 Thanked 18 Times in 18 Posts Yah, I need sum1 to help me >.< lol just kidding. I still need to get some stuff done on my raytracer, I'm working on the scene building code now. Im using Bloodshed Dev C++ 5.0 beta for my compiler: its free and its considered one of the best c++ compilers out there I think everyone should know some programming, at least everyone in the comp industry. I do it for fun, but I might want to be a programmer for a career. cya later, Matt __________________ Live the life you love, love the life you live

A little bit about who we are