Exemplo n.º 1
0
void gradientWaves::addPointsToMesh(ofMesh *m, ofNode l, ofNode r, int i){
    ofFloatColor col = ofColor::white;
    
    float mix = cos(i*3);
    ofFloatColor temp = ofColor::lightGreen;
    ofFloatColor temp2 = ofColor::darkMagenta;
    
    m->addVertex(l.getGlobalPosition());
    m->addColor(col);
    m->addVertex(r.getGlobalPosition());
    
    m->addColor(col);
}
Exemplo n.º 2
0
//----------------------------------------
void ofNode::setParent(ofNode& parent, bool bMaintainGlobalTransform) {
	if (this->parent)
	{
		// we need to make sure to clear before
		// re-assigning parenthood.
		clearParent(bMaintainGlobalTransform);
	}
	if(bMaintainGlobalTransform) {
		auto postParentPosition = position - parent.getGlobalPosition();
		auto postParentOrientation = orientation.get() * glm::inverse(parent.getGlobalOrientation());
		auto postParentScale = scale / parent.getGlobalScale();
		parent.addListener(*this);
		setOrientation(postParentOrientation);
		setPosition(postParentPosition);
		setScale(postParentScale);
	} else {
		parent.addListener(*this);
	}
	this->parent = &parent;
}
Exemplo n.º 3
0
//----------------------------------------
void ofNode::orbitRad(float longitude, float latitude, float radius, ofNode& centerNode) {
	orbitRad(longitude, latitude, radius, centerNode.getGlobalPosition());
}
Exemplo n.º 4
0
//----------------------------------------
void ofNode::lookAt(const ofNode& lookAtNode, const glm::vec3& upVector) {
	lookAt(lookAtNode.getGlobalPosition(), upVector);
}
Exemplo n.º 5
0
//----------------------------------------
void ofNode::lookAt(const ofNode& lookAtNode){
    lookAt(lookAtNode.getGlobalPosition());
}
Exemplo n.º 6
0
void ofNode::lookAt(ofNode& lookAtNode, const ofVec3f& upVector) {
	lookAt(lookAtNode.getGlobalPosition(), upVector);
}