Malarkey
27-02-2015 13:04:16
Hey!
Here is my code:
Everything works fine, but when I set a following point in acute angle to the previous point, the shape starts thinner and gets thiker (up to normal, desired size) in target-direction. This behaviour is stronger when the distance between the points is greater.
I do not know if this is a bug or a feature Anyway, how can I disable this?
Thanks!
(Great library, by the way. Oh, and another question: In the OgreWiki the SVG stuff looks pretty easy, but I don't have any SVG-methods or headers in my SDK (0.2) ?! )
Here is my code:
Procedural::Path p;
p.addPoint(this->startPos);
for(int i = 0; i < this->streetNodes.size(); i++){
Ogre::Vector3 pos = this->streetNodes.endPos;
p.addPoint(pos);
}
Procedural::Shape s = Procedural::Shape().addPoint(-1.2f,.2f).addPoint(-1.f,.2f).addPoint(-.9f,.1f).addPoint(.9f,.1f).addPoint(1.f,.2f).addPoint(1.2f,.2f).scale(2).setOutSide(Procedural::SIDE_LEFT);
Ogre::String entityName = NameGenerator::Next("extrudedMesh");
Procedural::Extruder().setExtrusionPath(&p).setCapped(false).setShapeToExtrude(&s).setUTile(20.f).realizeMesh(entityName);
Ogre::Entity* streetEntity = GameManager::getSingeltonPtr()->getSceneManager()->createEntity(entityName);
Ogre::SceneNode* node1= GameManager::getSingeltonPtr()->getSceneManager()->getRootSceneNode()->createChildSceneNode(NameGenerator::Next("StreetNode"));
entitySphere1->getBoundingBox();
node1->attachObject(streetEntity);
Everything works fine, but when I set a following point in acute angle to the previous point, the shape starts thinner and gets thiker (up to normal, desired size) in target-direction. This behaviour is stronger when the distance between the points is greater.
I do not know if this is a bug or a feature Anyway, how can I disable this?
Thanks!
(Great library, by the way. Oh, and another question: In the OgreWiki the SVG stuff looks pretty easy, but I don't have any SVG-methods or headers in my SDK (0.2) ?! )