コード例 #1
0
ファイル: box_shape.cpp プロジェクト: a12n/godot
void BoxShape::set_extents(const Vector3& p_extents) {

	extents=p_extents;
	_update_shape();
	notify_change_to_owners();
	_change_notify("extents");
}
コード例 #2
0
ファイル: plane_shape.cpp プロジェクト: AMG194/godot
void PlaneShape::set_plane(Plane p_plane) {

	plane=p_plane;
	_update_shape();
	notify_change_to_owners();
	_change_notify("plane");
}
コード例 #3
0
ファイル: sphere_shape.cpp プロジェクト: angjminer/godot
void SphereShape::set_radius(float p_radius) {

	radius = p_radius;
	_update_shape();
	notify_change_to_owners();
	_change_notify("radius");
}
コード例 #4
0
ファイル: capsule_shape_2d.cpp プロジェクト: KelinciFX/godot
CapsuleShape2D::CapsuleShape2D()
	: Shape2D(Physics2DServer::get_singleton()->capsule_shape_create()) {

	radius = 10;
	height = 20;
	_update_shape();
}
コード例 #5
0
ファイル: shape_line_2d.cpp プロジェクト: allkhor/godot
LineShape2D::LineShape2D() :
		Shape2D(Physics2DServer::get_singleton()->shape_create(Physics2DServer::SHAPE_LINE)) {

	normal = Vector2(0, -1);
	d = 0;
	_update_shape();
}
コード例 #6
0
ConvexPolygonShape2D::ConvexPolygonShape2D() : Shape2D( Physics2DServer::get_singleton()->shape_create(Physics2DServer::SHAPE_CONVEX_POLYGON)) {


	int pcount =3;
	for(int i=0;i<pcount;i++)
		points.push_back(Vector2(Math::sin(i*Math_PI*2/pcount),-Math::cos(i*Math_PI*2/pcount))*10);

	_update_shape();
}
コード例 #7
0
ファイル: ray_shape.cpp プロジェクト: allkhor/godot
void RayShape::set_length(float p_length) {

	length = p_length;
	_update_shape();
	notify_change_to_owners();
}
コード例 #8
0
ファイル: circle_shape_2d.cpp プロジェクト: FateAce/godot
CircleShape2D::CircleShape2D()
	: Shape2D(Physics2DServer::get_singleton()->shape_create(Physics2DServer::SHAPE_CIRCLE)) {

	radius = 10;
	_update_shape();
}
コード例 #9
0
ファイル: circle_shape_2d.cpp プロジェクト: FateAce/godot
void CircleShape2D::set_radius(real_t p_radius) {

	radius = p_radius;
	_update_shape();
}
コード例 #10
0
ファイル: shape_line_2d.cpp プロジェクト: allkhor/godot
void LineShape2D::set_d(real_t p_d) {

	d = p_d;
	_update_shape();
}
コード例 #11
0
ファイル: shape_line_2d.cpp プロジェクト: allkhor/godot
void LineShape2D::set_normal(const Vector2 &p_normal) {

	normal = p_normal;
	_update_shape();
}
コード例 #12
0
void ConvexPolygonShape::set_points(const PoolVector<Vector3> &p_points) {

	points = p_points;
	_update_shape();
	notify_change_to_owners();
}
コード例 #13
0
ファイル: circle_shape_2d.cpp プロジェクト: 93i/godot
CircleShape2D::CircleShape2D() :
		Shape2D(Physics2DServer::get_singleton()->circle_shape_create()) {

	radius = 10;
	_update_shape();
}
コード例 #14
0
ファイル: capsule_shape_2d.cpp プロジェクト: KelinciFX/godot
void CapsuleShape2D::set_height(real_t p_height) {

	height = p_height;
	_update_shape();
}
コード例 #15
0
ファイル: rectangle_shape_2d.cpp プロジェクト: MattUV/godot
RectangleShape2D::RectangleShape2D()
	: Shape2D(Physics2DServer::get_singleton()->shape_create(Physics2DServer::SHAPE_RECTANGLE)) {

	extents = Vector2(10, 10);
	_update_shape();
}
コード例 #16
0
ファイル: rectangle_shape_2d.cpp プロジェクト: MattUV/godot
void RectangleShape2D::set_extents(const Vector2 &p_extents) {

	extents = p_extents;
	_update_shape();
}
コード例 #17
0
void ConvexPolygonShape2D::set_points(const Vector<Vector2>& p_points) {

	points=p_points;
	_update_shape();
}