top of page
Search
  • cedarcantab

s2 Settings


// SPDX-FileCopyrightText: 2024 Erin Catto
// SPDX-License-Identifier: MIT

#pragma once

#include "solver2d/types.h"

struct Settings
{
	void Save();
	void Load();

	int sampleIndex = 0;
	int windowWidth = 1920;
	int windowHeight = 1080;
	float hertz = 60.0f;
	float timeStep = 1.0f / 60.0f;
	int primaryIterations = 4;
	int secondaryIterations = 2;
	int multiSteps = 1;
	int textLine = 0;
	int textIncrement = 18;
	bool enabledSolvers[s2_solverTypeCount] = {};
	bool enableWarmStarting = true;
	bool drawShapes = true;
	bool drawJoints = true;
	bool drawAABBs = false;
	bool drawContactPoints = false;
	bool drawContactNormals = false;
	bool drawContactImpulse = false;
	bool drawFrictionImpulse = false;
	bool drawMass = false;
	bool drawStats = false;
	bool pause = false;
	bool singleStep = false;
	bool restart = false;
};


7 views0 comments

Recent Posts

See All

b2Distance

// MIT License // Copyright (c) 2019 Erin Catto // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"

p2 naive broadphase

var Broadphase = require('../collision/Broadphase'); module.exports = NaiveBroadphase; /** * Naive broadphase implementation. Does N^2 tests. * * @class NaiveBroadphase * @constructor * @extend

Extending Box2D-Lite in Javascript: Revolute Joint

/// Revolute joint definition. This requires defining an anchor point where the /// bodies are joined. The definition uses local anchor points so that the /// initial configuration can violate the con

記事: Blog2_Post
bottom of page