<commit_before>#include "Chicken.h"

Chicken::Chicken()
{
}

void Chicken::build()
{
	Vector nullVec = Vector();

	Ellipsoid* body = new Ellipsoid(0.5f, 0.3f, 0.2f);
	Ellipsoid* head = new Ellipsoid(0.2f, 0.1f, 0.1f);
	Ellipsoid* eye = new Ellipsoid(0.02f, 0.02f, 0.02f);
	Ellipsoid* knee = new Ellipsoid(0.04f, 0.04f, 0.04f);
	Cylinder* neck = new Cylinder(0.0f, 0.0f, 0.08f, 0.6f, 1.0f);
	Cylinder* upperLeg = new Cylinder(0.0f, 0.0f, 0.03f, 0.5f, 1.0f);
	Cone* beak = new Cone(0.0f, 0.0f, 0.04f, 0.2f, 1.0f);
	Cone* mohawk = new Cone(0.0f, 0.0f, 0.03f, 0.23f, 1.0f);

	_isAlive = true;
	_acceleration = _velocity = _position = nullVec;
	_boundingRadius = 0.4f;

	body->tesselate();
	head->tesselate();
	eye->tesselate();
	knee->tesselate();

	neck->tesselate();
	upperLeg->tesselate();

	beak->tesselate();
	mohawk->tesselate();

	_body = body;
	_head = head;
	_eye = eye;
	_knee = knee;
	_neck = neck;
	_upperLeg = upperLeg;
	_beak = beak;
	_mohawk = mohawk;

	_eyeMaterial.kAmbient = Color(1.0f, 0.925f, 0.545f);
	_eyeMaterial.kDiffuse = Color(1.0f, 0.925f, 0.545f);
	_eyeMaterial.isSpecular = true;
	_eyeMaterial.kSpecular = Color(1.0f, 1.0f, 1.0f);
	_eyeMaterial.shininess = 20.0f;

	_bodyMaterial.kAmbient = Color(0.637f, 0.32f, 0.176f);
	_bodyMaterial.kDiffuse = Color(0.637f, 0.32f, 0.176f);
	_bodyMaterial.isSpecular = false;
	_bodyMaterial.kSpecular = Color(0.0f, 0.0f, 0.0f);
	_bodyMaterial.shininess = 0.0f;

	_limbMaterial.kAmbient = Color(1.0f, 0.612f, 0.0f);
	_limbMaterial.kDiffuse = Color(1.0f, 0.612f, 0.0f);
	_limbMaterial.isSpecular = false;
	_limbMaterial.kSpecular = Color(0.0f, 0.0f, 0.0f);
	_limbMaterial.shininess = 0.0f;
}

void Chicken::render()
{
	if (!_isShadowMode)
		_bodyMaterial.setup_gl();
	glPushMatrix();
	glTranslatef(0.0f, 1.0f, 0.0f);
	glRotatef(20.0f, 0.0f, 0.0f, 1.0f);
	_body->render();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(0.3f, 1.6f, 0.0f);
	glRotatef(-20.0f, 0.0f, 0.0f, 1.0f);
	glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
	_neck->render();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(0.4f, 1.6f, 0.0f);
	_head->render();
	glPushMatrix();
	if (!_isShadowMode)
		_eyeMaterial.setup_gl();
	glTranslatef(0.1f, 0.0f, 0.1f);
	_eye->render();
	glTranslatef(0.0f, 0.0f, -0.2f);
	_eye->render();
	glPopMatrix();
	glPushMatrix();
	if (!_isShadowMode)
		_limbMaterial.setup_gl();
	glTranslatef(0.25f, -0.028f, 0.0f);
	glRotatef(-90.0f, 0.0f, 0.0f, 1.0f);
	_beak->render();
	glPopMatrix();
	glPushMatrix();
	if (!_isShadowMode)
		_limbMaterial.setup_gl();
	glTranslatef(0.12f, 0.185f, 0.0f);
	glPushMatrix();
	glRotatef(-20.0f, 0.0f, 0.0f, 1.0f);
	_mohawk->render();
	glPopMatrix();
	glTranslatef(-0.06f, 0.0, 0.0f);
	_mohawk->render();
	glTranslatef(-0.06f, 0.0, 0.0f);
	_mohawk->render();
	glTranslatef(-0.06f, 0.0, 0.0f);
	_mohawk->render();
	glTranslatef(-0.06f, 0.0, 0.0f);
	glPushMatrix();
	glRotatef(20.0f, 0.0f, 0.0f, 1.0f);
	_mohawk->render();
	glPopMatrix();
	glPopMatrix();
	glPopMatrix();

	if (!_isShadowMode)
		_limbMaterial.setup_gl();
	glPushMatrix();
	glTranslatef(-0.08f, 0.4f, -0.2f);
	glRotatef(-80.0f, 1.0f, 0.0f, 0.0f);
	glRotatef(20.0f, 0.0f, 1.0f, 0.0f);
	_upperLeg->render();
	glPushMatrix();
	_knee->render();
	glRotatef(120.0f, 0.0f, 1.0f, 0.0f);
	_upperLeg->render();
	glPushMatrix();
	glTranslatef(0.0f, 0.0f, 0.5f);
	glRotatef(-60.0f, 0.0f, 1.0f, 0.0f);
	_knee->render();
	_upperLeg->render();
	glPopMatrix();
	glPopMatrix();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(-0.08f, 0.4f, 0.2f);
	glRotatef(-110.0f, 1.0f, 0.0f, 0.0f);
	glRotatef(20.0f, 0.0f, 1.0f, 0.0f);
	_upperLeg->render();
	glPushMatrix();
	_knee->render();
	glRotatef(120.0f, 0.0f, 1.0f, 0.0f);
	_upperLeg->render();
	glPushMatrix();
	glTranslatef(0.0f, 0.0f, 0.5f);
	glRotatef(-60.0f, 0.0f, 1.0f, 0.0f);
	_knee->render();
	_upperLeg->render();
	glPopMatrix();
	glPopMatrix();
	glPopMatrix();
}

void Chicken::setTransformations()
{
	glTranslatef(_position.x, _position.y, _position.z);<commit_msg>Added fixes for chicken cylindrical limb angles<commit_after>#include "Chicken.h"

Chicken::Chicken()
{
}

void Chicken::build()
{
	Vector nullVec = Vector();

	Ellipsoid* body = new Ellipsoid(0.5f, 0.3f, 0.2f);
	Ellipsoid* head = new Ellipsoid(0.2f, 0.1f, 0.1f);
	Ellipsoid* eye = new Ellipsoid(0.02f, 0.02f, 0.02f);
	Ellipsoid* knee = new Ellipsoid(0.04f, 0.04f, 0.04f);
	Cylinder* neck = new Cylinder(0.08f, 0.6f, 1.0f);
	Cylinder* upperLeg = new Cylinder(0.03f, 0.5f, 1.0f);
	Cone* beak = new Cone(0.0f, 0.0f, 0.04f, 0.2f, 1.0f);
	Cone* mohawk = new Cone(0.0f, 0.0f, 0.03f, 0.23f, 1.0f);

	_isAlive = true;
	_acceleration = _velocity = _position = nullVec;
	_boundingRadius = 0.4f;

	body->tesselate();
	head->tesselate();
	eye->tesselate();
	knee->tesselate();

	neck->tesselate();
	upperLeg->tesselate();

	beak->tesselate();
	mohawk->tesselate();

	_body = body;
	_head = head;
	_eye = eye;
	_knee = knee;
	_neck = neck;
	_upperLeg = upperLeg;
	_beak = beak;
	_mohawk = mohawk;

	_eyeMaterial.kAmbient = Color(1.0f, 0.925f, 0.545f);
	_eyeMaterial.kDiffuse = Color(1.0f, 0.925f, 0.545f);
	_eyeMaterial.isSpecular = true;
	_eyeMaterial.kSpecular = Color(1.0f, 1.0f, 1.0f);
	_eyeMaterial.shininess = 20.0f;

	_bodyMaterial.kAmbient = Color(0.637f, 0.32f, 0.176f);
	_bodyMaterial.kDiffuse = Color(0.637f, 0.32f, 0.176f);
	_bodyMaterial.isSpecular = false;
	_bodyMaterial.kSpecular = Color(0.0f, 0.0f, 0.0f);
	_bodyMaterial.shininess = 0.0f;

	_limbMaterial.kAmbient = Color(1.0f, 0.612f, 0.0f);
	_limbMaterial.kDiffuse = Color(1.0f, 0.612f, 0.0f);
	_limbMaterial.isSpecular = false;
	_limbMaterial.kSpecular = Color(0.0f, 0.0f, 0.0f);
	_limbMaterial.shininess = 0.0f;
}

void Chicken::render()
{
	if (!_isShadowMode)
		_bodyMaterial.setup_gl();
	glPushMatrix();
	glTranslatef(0.0f, 1.0f, 0.0f);
	glRotatef(20.0f, 0.0f, 0.0f, 1.0f);
	_body->render();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(0.2f, 1.0f, 0.0f);
	glRotatef(-20.0f, 0.0f, 0.0f, 1.0f);
	_neck->render();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(0.4f, 1.6f, 0.0f);
	_head->render();
	glPushMatrix();
	if (!_isShadowMode)
		_eyeMaterial.setup_gl();
	glTranslatef(0.1f, 0.0f, 0.1f);
	_eye->render();
	glTranslatef(0.0f, 0.0f, -0.2f);
	_eye->render();
	glPopMatrix();
	glPushMatrix();
	if (!_isShadowMode)
		_limbMaterial.setup_gl();
	glTranslatef(0.25f, -0.028f, 0.0f);
	glRotatef(-90.0f, 0.0f, 0.0f, 1.0f);
	_beak->render();
	glPopMatrix();
	glPushMatrix();
	if (!_isShadowMode)
		_limbMaterial.setup_gl();
	glTranslatef(0.12f, 0.185f, 0.0f);
	glPushMatrix();
	glRotatef(-20.0f, 0.0f, 0.0f, 1.0f);
	_mohawk->render();
	glPopMatrix();
	glTranslatef(-0.06f, 0.0, 0.0f);
	_mohawk->render();
	glTranslatef(-0.06f, 0.0, 0.0f);
	_mohawk->render();
	glTranslatef(-0.06f, 0.0, 0.0f);
	_mohawk->render();
	glTranslatef(-0.06f, 0.0, 0.0f);
	glPushMatrix();
	glRotatef(20.0f, 0.0f, 0.0f, 1.0f);
	_mohawk->render();
	glPopMatrix();
	glPopMatrix();
	glPopMatrix();

	if (!_isShadowMode)
		_limbMaterial.setup_gl();
	glPushMatrix();
	glTranslatef(-0.08f, 0.4f, -0.2f);
	glRotatef(-80.0f, 1.0f, 0.0f, 0.0f);
	glRotatef(20.0f, 0.0f, 1.0f, 0.0f);
	glPushMatrix();
	glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
	_upperLeg->render();
	glPopMatrix();
	glPushMatrix();
	_knee->render();
	glRotatef(120.0f, 0.0f, 1.0f, 0.0f);
	glPushMatrix();
	glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
	_upperLeg->render();
	glPopMatrix();
	glPushMatrix();
	glTranslatef(0.0f, 0.0f, 0.5f);
	glRotatef(-60.0f, 0.0f, 1.0f, 0.0f);
	_knee->render();
	glPushMatrix();
	glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
	_upperLeg->render();
	glPopMatrix();
	glPopMatrix();
	glPopMatrix();
	glPopMatrix();

	glPushMatrix();
	glTranslatef(-0.08f, 0.4f, 0.2f);
	glRotatef(-110.0f, 1.0f, 0.0f, 0.0f);
	glRotatef(20.0f, 0.0f, 1.0f, 0.0f);
	glPushMatrix();
	glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
	_upperLeg->render();
	glPopMatrix();
	glPushMatrix();
	_knee->render();
	glRotatef(120.0f, 0.0f, 1.0f, 0.0f);
	glPushMatrix();
	glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
	_upperLeg->render();
	glPopMatrix();
	glPushMatrix();
	glTranslatef(0.0f, 0.0f, 0.5f);
	glRotatef(-60.0f, 0.0f, 1.0f, 0.0f);
	_knee->render();
	glPushMatrix();
	glRotatef(90.0f, 1.0f, 0.0f, 0.0f);
	_upperLeg->render();
	glPopMatrix();
	glPopMatrix();
	glPopMatrix();
	glPopMatrix();
}

void Chicken::setTransformations()
{
	glTranslatef(_position.x, _position.y, _position.z);
{'fraction_non_alphanumeric': 0.20611332608433008, 'fraction_numerical': 0.09894889452700253, 'mean_word_length': 4.306410256410256, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 61, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5794692', 'n_tokens_mistral': 4690, 'n_tokens_neox': 4197, 'n_words': 665}