be.yildiz.module.physics.bullet.BulletStaticBody Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of module-physics-bullet Show documentation
Show all versions of module-physics-bullet Show documentation
Bullet implementation for the physics module.
// This file is part of the Yildiz-Online project, licenced under the MIT License
// (MIT)
//
// Copyright (c) 2016 Grégory Van den Borre
//
// More infos available: http://yildiz.bitbucket.org
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
package be.yildiz.module.physics.bullet;
import be.yildiz.common.id.EntityId;
import be.yildiz.common.nativeresources.NativePointer;
import be.yildiz.common.vector.Point3D;
import be.yildiz.module.physics.StaticBody;
import lombok.Getter;
/**
* A static body is intended to stay at its original position and will never move, it has a mass of 0 and is not affected by physic forces.
*
* @author Grégory Van den Borre
*/
final class BulletStaticBody extends BulletBody implements StaticBody {
@Getter
private final Point3D position;
@Getter
private final Point3D direction;
/**
* Full constructor.
*
* @param pointerAddress Pointer to the native object.
* @param worldPointer World pointer address.
* @param id Associated id.
*/
BulletStaticBody(final NativePointer pointerAddress, final NativePointer worldPointer, final Point3D position, final Point3D direction, final EntityId id) {
super(pointerAddress, worldPointer, id);
this.position = position;
this.direction = direction;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy