/// <summary>This method paints all pixels at the specified point using the shape of a sphere.</summary> public void HandleHitPoint(bool preview, int priority, float pressure, int seed, Vector3 position, Quaternion rotation) { if (paint != PaintType.In3D) { return; } if (modifiers != null && modifiers.Count > 0) { P3dHelper.BeginSeed(seed); modifiers.ModifyPosition(ref position, preview, pressure); P3dHelper.EndSeed(); } P3dCommandDecal.Instance.SetState(preview, priority); P3dCommandDecal.Instance.SetLocation(position); var worldSize = HandleHitCommon(preview, pressure, seed, rotation); var worldRadius = P3dHelper.GetRadius(worldSize); var worldPosition = position; HandleMaskCommon(worldPosition); P3dPaintableManager.SubmitAll(P3dCommandDecal.Instance, worldPosition, worldRadius, layers, group, targetModel, targetTexture); }
/// <summary>This method paints all pixels between two pairs of points using the shape of a sphere.</summary> public void HandleHitQuad(bool preview, int priority, Vector3 position, Vector3 endPosition, Vector3 position2, Vector3 endPosition2, Quaternion rotation, float pressure) { Command.Instance.SetState(preview, priority); Command.Instance.SetLocation(position, endPosition, position2, endPosition2); var worldSize = HandleHitCommon(rotation, pressure); var worldRadius = P3dHelper.GetRadius(worldSize, position, endPosition, position2, endPosition2); var worldPosition = P3dHelper.GetPosition(position, endPosition, position2, endPosition2); P3dPaintableManager.SubmitAll(Command.Instance, worldPosition, worldRadius, layers, group, targetModel, targetTexture); }
/// <summary>This method paints all pixels between three points using the shape of a sphere.</summary> public void HandleHitTriangle(bool preview, int priority, float pressure, int seed, Vector3 positionA, Vector3 positionB, Vector3 positionC, Quaternion rotation) { P3dCommandSphere.Instance.SetState(preview, priority); P3dCommandSphere.Instance.SetLocation(positionA, positionB, positionC); var worldSize = HandleHitCommon(preview, pressure, seed, rotation); var worldRadius = P3dHelper.GetRadius(worldSize, positionA, positionB, positionC); var worldPosition = P3dHelper.GetPosition(positionA, positionB, positionC); HandleMaskCommon(worldPosition); P3dPaintableManager.SubmitAll(P3dCommandSphere.Instance, worldPosition, worldRadius, layers, group, targetModel, targetTexture); }
/// <summary>This method paints all pixels between two pairs of points using the shape of a sphere.</summary> public void HandleHitQuad(bool preview, int priority, float pressure, int seed, Vector3 position, Vector3 endPosition, Vector3 position2, Vector3 endPosition2, Quaternion rotation) { if (paint != PaintType.In3D) { return; } P3dCommandDecal.Instance.SetState(preview, priority); P3dCommandDecal.Instance.SetLocation(position, endPosition, position2, endPosition2); var worldSize = HandleHitCommon(preview, pressure, seed, rotation); var worldRadius = P3dHelper.GetRadius(worldSize, position, endPosition, position2, endPosition2); var worldPosition = P3dHelper.GetPosition(position, endPosition, position2, endPosition2); HandleMaskCommon(worldPosition); P3dPaintableManager.SubmitAll(P3dCommandDecal.Instance, worldPosition, worldRadius, layers, group, targetModel, targetTexture); }