Ejemplo n.º 1
0
//--------------------------------------------------------------
void ofxBulletJoint::draw() {
	if(!_bCreated) {ofLog(OF_LOG_ERROR, "ofxBulletJoint :: draw : must call create() first"); return;}
	
	ofVec3f pa;
	ofVec3f pb;
	
	pb = getPositionB();
	if(_bTwoBodies) {
		pa = getPositionA();
	} else {
		pa = _targetPos;
	}
    
    ofLine( pa, pb );
}
Ejemplo n.º 2
0
//--------------------------------------------------------------
void ofxBulletJoint::draw() {
	if(!_bCreated) {ofLog(OF_LOG_ERROR, "ofxBulletJoint :: draw : must call create() first"); return;}
	
	ofVec3f pa;
	ofVec3f pb;
	
	pb = getPositionB();
	if(_bTwoBodies) {
		pa = getPositionA();
	} else {
		pa = _targetPos;
	}
	
	glBegin(GL_LINES);
		glVertex3f(pa.x, pa.y, pa.z);
		glVertex3f(pb.x, pb.y, pb.z);
	glEnd();
}